>
> @Jorge

# defining a function

is.installed <- function(mypkg) is.element(mypkg, installed.packages()[,1])


Thanks for that

*Vincent Davis
720-301-3003 *
vincent@vincentdavis.net
 my blog <http://vincentdavis.net> |
LinkedIn<http://www.linkedin.com/in/vincentdavis>


On Sat, Apr 3, 2010 at 10:50 PM, Jorge Ivan Velez
<jorgeivanvelez@gmail.com>wrote:

> 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, Vincent Davis <> wrote:
>
>> 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 *
>> vincent@vincentdavis.net
>>  my blog <http://vincentdavis.net> |
>> LinkedIn<http://www.linkedin.com/in/vincentdavis>
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

	[[alternative HTML version deleted]]

