[R] Tool for update

Thomas Lumley tlumley at u.washington.edu
Thu Mar 24 22:03:25 CET 2005


On Thu, 24 Mar 2005, Darren Weber wrote:

> Is there a way to set a cron job to automatically update packages?
> Maybe something like this:
>
> $unixprompt> R --vanilla update.packages()
>

If you put
update.packages(repos="http://cran.us.r-project.org", ask=FALSE)

in a file update.R you can do
   R CMD BATCH update.R update.log
or even fancier, something like
   R CMD BATCH update.R update-`date --iso-8601`.log

to keep dated log files.

 	-thomas




More information about the R-help mailing list