Re: [R] test if a package is installed

2010-04-03 Thread Vincent Davis
> > @Jorge # defining a function is.installed <- function(mypkg) is.element(mypkg, installed.packages()[,1]) Thanks for that *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog | LinkedIn On Sat, Apr 3, 2010 at 10

Re: [R] test if a package is installed

2010-04-03 Thread Jorge Ivan Velez
Hi Vincent, Perhaps the following might work: # defining a function is.installed <- function(mypkg) is.element(mypkg, installed.packages()[,1]) R> is.installed('MASS') [1] TRUE R> is.installed('base') [1] TRUE R> is.installed('ROCR') [1] FALSE HTH, Jorge On Sun, Apr 4, 2010 at 12:40 AM, Vin

[R] test if a package is installed

2010-04-03 Thread Vincent Davis
I am aware of .packages(all.available = TRUE) but I would like to just ask .packages('base') and get TRUE or even better check a list of packages and get a true/false list back. Is there a way to do this? *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog |