Re: [R] Install package automatically if not there?

From: Bert Gunter <gunter.berton_at_gene.com>
Date: Thu, 24 Jun 2010 12:35:18 -0700

You mean if a "package" has been installed?! (big difference)

?installed.packages or ?.packages with all.available = TRUE
?install.packages

Bert Gunter
Genentech Nonclinical Biostatistics    

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of Ralf B
Sent: Thursday, June 24, 2010 12:26 PM
To: r-help_at_r-project.org
Subject: [R] Install package automatically if not there?

Hi fans,

is it possible for a script to check if a library has been installed? I want to automatically install it if it is missing to avoid scripts to crash when running on a new machine...

Ralf



R-help_at_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.

R-help_at_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. Received on Thu 24 Jun 2010 - 19:37:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jun 2010 - 05:50:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive