Question: Is there a way to specify where BiocInstaller will install packages similar to the "lib=...." for install.packages?
gravatar for ariel
4 months ago by
ariel0 wrote:

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?

ADD COMMENTlink modified 4 months ago by James W. MacDonald49k • written 4 months ago by ariel0
Answer: Is there a way to specify where BiocInstaller will install packages similar to t
gravatar for James W. MacDonald
4 months ago by
United States
James W. MacDonald49k wrote:

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 COMMENTlink written 4 months ago by James W. MacDonald49k

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


    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

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

     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
ADD REPLYlink written 4 months ago by James W. MacDonald49k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 188 users visited in the last hour