Hi,
I tried the following:
local({r <- getOption("repos")
r["CRAN"] <- "http://local.cran.server/"
r["MIRROR"] <- "http://cran.mirror/"
options(repos=r)
})
But: R seems always to take the "CRAN" entry first, therefore I put our
local mirror there.
If a R session starts and the "CRAN" server is not available then a
package is taken from the "MIRROR" server. If the server comes up during
the session then the next install.packages will use the "CRAN" server.
But if the "CRAN" server becomes unavailable during a session then the
"MIRROR" server is not checked and I get an error message "download of
package 'xyz' failed".
Any ideas?
Sigbert
Am 19.06.2015 um 15:32 schrieb Thierry Onkelinx:
> We have this in our Rprofile.site This works fine. It checks each mirror
> and installs (or updates) the latest version available on all mirrors. e.g.
> abc 0.1 on RStudio and abc 0.2 on RForge, then abc 0.2 from RForge gets
> installed/updated.
>
> options(
> repos = c(
> RStudio = "http://cran.rstudio.com/",
> RForge = "http://r-forge.r-project.org",
> Belgium = "http://www.freestatistics.org/cran/",
> CRAN = "http://cran.at.r-project.org/",
> Oxford = "http://www.stats.ox.ac.uk/pub/RWin"
> ),
> install.packages.check.source = "no"
> )
--
http://u.hu-berlin.de/sk
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
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.