Skip to content
Prev 173237 / 398503 Next

require() is not giving TRUE / FALSE statements ?

On 10/03/2009 4:15 PM, Wolfgang Raffelsberger wrote:
You never printed the value, so you didn't see it.  (It was returned 
marked invisible, i.e. not for printing.)

Just save the value to a variable, or use it in a test, or explicitly 
print it:
 > print(require(stats))
[1] TRUE
 > print(require(doesNotExist))
Loading required package: doesNotExist
[1] FALSE
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, 
logical.return = TRUE,  :
   there is no package called 'doesNotExist'

Duncan Murdoch