Is there a way to specify which siteRepos to use by default?
We have a few repositories local to our site where users can put packages.
However they are confused about this:
install.package(
pkgs=c("localPackage1", "localPackage2") # will happily workBiocInstaller::biocLite(
pkgs=c("localPackage1", "localPackage2")) # will fail miserablyBiocInstaller::biocLite(
pkgs=c("localPackage1", "localPackage2"),
siteRepos = siteRepos) # will happily work
Our global Rprofile looks a little like this:
# To have predefined variable that can be used later and during R sessions siteRepos = c( repo1= "http://server/repo1", repo2 = "http://server/repo2" ) # Make the siteRepos available by default options("repos" = c( CRAN="http://server/internal-cranmirror", siteRepos )) # Use internal bandwith so we save upstream a few bytes options("BioC_mirror" = "http://server/bioconductor")
The problem is I don't see a way to tell biocLite about these locations so users don't have to know about it. This also breaks the user experience when they create a package that is in our custom repositories and depends on packages from Bioconductor.
Is there any way to let BiocInstaller::biocLite
know about these repos, some option or other setting that will honor all the repos in options()$repos
?
I'm afraid I don't have a good solution, but I can echo that I've run into the same problem in the past. There's an explicit statement in
biocinstallRepos()
that temporarily removes your local repositories i.e.I got around it by pretending my local packages were part of Bioconductor and putting them under the bioc folder in my local Bioconductor mirror. That was sufficient for the course we were running, but it's definitely more of a hack than a satisfying solution.
Repositories are searched for packages in the order of the repositories. We could come up with a solution that places repo1 and repo2 after the Bioconductor repositories. This seems like a good solution provided the purpose of your repos is to add new packages, rather than to 'mask' existing packages.
Would that serve your purposes?