[R] Install package automatically if not there?

David Winsemius dwinsemius at comcast.net
Thu Jun 24 22:52:02 CEST 2010


Nice. Very nice.

--  
David.

On Jun 24, 2010, at 4:32 PM, Albert-Jan Roskam wrote:

> require(pkg) || install.packages(pkg)
>
> Cheers!!
>
> Albert-Jan
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> All right, but apart from the sanitation, the medicine, education,  
> wine, public order, irrigation, roads, a fresh water system, and  
> public health, what have the Romans ever done for us?
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> --- On Thu, 6/24/10, Ralf B <ralf.bierig at gmail.com> wrote:
>
> From: Ralf B <ralf.bierig at gmail.com>
> Subject: [R] Install package automatically if not there?
> To: "r-help at r-project.org" <r-help at r-project.org>
> Date: Thursday, June 24, 2010, 9:25 PM
>
> 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.
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.



More information about the R-help mailing list