Is there a way to specify where BiocInstaller will install packages similar to the "lib=...." for install.packages?
1
0
Entering edit mode
ariel ▴ 20
@ariel-16886
Last seen 3.0 years ago
United States

install.pacakges has an option where you can specify where a package will be installed. For example:


install.packages("ggplot2", lib="/data/Rpackages/")

I use conda environments for package mangement. However, I occasionally run into a Bioconductor package which does not have a recipe. To not pollute my conda environment, I would like anything BiocInstaller installs to be placed in $HOME/R. I don't seen an option for this in the docs.

Is there a way?

biocinstaller custom library path installation package installation • 9.8k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 6 hours ago
United States

Both BiocInstall and BiocManager (for Bioc-devel, and in future all Bioc installations) use install.packages under the hood, and have an ellipsis argument (...), which allows you to pass arbitrary arguments to lower level functions. Which is a long way of saying that you have, by definition, a lib argument that will be passed through via the ellipsis argument.

ADD COMMENT
0
Entering edit mode

And for completeness, I should point out that you could have found this by reading ?biocLite. See under the ... argument

Arguments:

    pkgs: 'character()' of package names to install or update.  A
          missing value and 'suppressUpdates=FALSE' updates installed
          packages, perhaps also installing 'Biobase', 'IRanges', and
          'AnnotationDbi' if they are not already installed. Package
          names containing a '/' are treated as github repositories and
          installed using the 'install_github()' function of the
          'remotes' package.

suppressUpdates: 'logical(1)' or 'character()'. When 'FALSE', biocLite
          asks the user whether old packages should be update. When
          'TRUE', the user is not prompted to update old packages. When
          'character()' a vector specifying which packages to NOT
          update.

suppressAutoUpdate: 'logical(1)' indicating whether the 'BiocInstaller'
          package updates itself.

siteRepos: 'character()' representing an additional repository in which
          to look for packages to install. This repository will be
          prepended to the default repositories (which you can see with
          'biocinstallRepos').

     ask: 'logical(1)' indicating whether to prompt user before
          installed packages are updated, or the character string
          'graphics', which brings up a widget for choosing which
          packages to update.  If TRUE, user can choose whether to
          update all outdated packages without further prompting, to
          pick and choose packages to update, or to cancel updating (in
          a non-interactive session, no packages will be updated).
          Otherwise, the value is passed to 'update.packages'.

     ...: Additional arguments.

          When installing CRAN or Bioconductor packages, typical
          arguments include: 'lib.loc', passed to 'old.packages' and
          used to determine the library location of installed packages
          to be updated; and 'lib', passed to 'install.packages' to
          determine the library location where 'pkgs' are to be
          installed.
ADD REPLY

Login before adding your answer.

Traffic: 692 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6