[R] Setting bioconductor repository in .Rprofile. Is there a permanent way?
kw.stat at gmail.com
Mon Jan 24 20:49:09 CET 2011
Of course, before posting my question, I did RTFM and RTFcode and
RTFmailinglists. The key word in my question was "simpler". I
rejected copying a modified version of the "repositories" file to my
home directory since it has changed numerous times with addition of
Here is another option. More lines of code, but doesn't add unneeded
pp <- file.path(R.home("etc"), "repositories")
rr <- tools:::.read_repositories(pp)
repos <- structure(c(CRAN="http://streaming.stat.iastate.edu/CRAN",
rm(pp, rr, repos)
Martin, I appreciated your clever trick of evaluating on demand.
On Mon, Jan 24, 2011 at 12:45 PM, Kevin Wright <kw.stat at gmail.com> wrote:
> I currently set the Bioconductor repository in my .Rprofile using this
> code (which needs editing for every version number change of
> # Choose repositories
> repos <- structure(c(CRAN="http://streaming.stat.iastate.edu/CRAN",
> I'd like to avoid editing the version number. One hack to do so is
> this code that adds all repositories.
> r <- getOption("repos")
> r <- r[!is.na(r)]
> Is there a simpler way? I've searched for quite a while without
> finding an answer.
> Incidentally, the help page for "options" says:
> A Bioconductor mirror can be selected by setting
> options("BioC_mirror"): the default value is
> The word "default" is a bit confusing here, because when I start R, I see:
> R> options()$BioC_mirror
> Kevin Wright
More information about the R-help