Question: Is there a way to specify where BiocInstaller will install packages similar to the "lib=...." for install.packages?
0
10 months ago by
ariel0
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?

modified 10 months ago by James W. MacDonald50k • written 10 months ago by ariel0
Answer: Is there a way to specify where BiocInstaller will install packages similar to t
0
10 months ago by
United States
James W. MacDonald50k 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.

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
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'

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'.

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.