Re: [R] Tool for update

From: Ronaldo Reis-Jr. <chrysopa_at_insecta.ufv.br>
Date: Sat 23 Apr 2005 - 00:56:26 EST

Em Sex 25 Mar 2005 11:16, abunn escreveu:
> I edited Rprofile to update everything on Tuesdays. I've been doing this
> since 2.0 and I think I've had R running almost every Tuesday, which begs
> the question of what I would be doing if R hadn't come into existence.
>
> In any case, It works pretty well:
>
> ## This script gets all the packages I don't already have
> # Run this once a week - say Tuesdays
> if (interactive() ) { library(utils)}
> is.tuesday <- as.POSIXlt(Sys.time())$wday == 2
> if (is.tuesday == T)
> {
> cat("Running a package check...\nOccurs once a week, on Tuesdays\n")
> cat("Upgrade existing packages and check for new packages (y/N)? ")
> check.new <- as.character(readLines(n = 1))
> if (any(check.new == "y", check.new == "Y"))
> {
> options(CRAN = "http://cran.us.r-project.org/")
> cat("This can take a few seconds...\n")
> x <- packageStatus(repositories = getOption("repositories")()[[1]])
> print(x)
> install.packages(x$avail$Package[x$avail$Status == "not
> installed"]) cat("Upgrading to new versions if available\n")
> upgrade(x)
> }
> }
>

Hi,

I make a little adapt to this script and try to use.

But, when a file dont exist, the installation is aborted.

trying URL `http://cran.us.r-project.org/src/contrib/assist_0.1.2.tar.gz' Error in download.file(url, destfile, method) :

        cannot open URL
`http://cran.us.r-project.org/src/contrib/assist_0.1.2.tar.gz' In addition: Warning message:
cannot open: HTTP status was `404 Not Found'

Is possible to force R to continue the installation.

Thanks
Ronaldo

--
|>   // | \\   [***********************************]
|   ( §   § )  [Ronaldo Reis J˙nior                ]
|>      V      [UFV/DBA-Entomologia                ]
|    /     \   [36571-000 Višosa - MG              ]
|>  /(.''`.)\  [Fone: 31-3899-4007                 ]
|  /(: :'  :)\ [chrysopa@insecta.ufv.br            ]
|>/ (`. `'` ) \[ICQ#: 5692561 | LinuxUser#: 205366 ]
|    ( `-  )   [***********************************]
|>>  _/   \_Powered by GNU/Debian Woody/Sarge

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat Apr 23 01:03:06 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:22 EST