Using `install.packages` with conda-managed R I have R installed and managed by conda (miniconda) on my MacBook Pro. The version of R I use most frequently (3.5.1) is installed on the base environment and I have other version-specific environments as well. I did this as it was easier than managing R on homebrew.

The downside I now face is that I cannot use install.packages(), BiocManager::install() or biocLite() to install most packages. devtools::install_github() seems to work fine for the few packages I have installed from GitHub.

I have to use conda install -c [conda-forge|bioconda] [r|bioconductor]-package_name to install my packages and it breaks my workflow and I need to step outside of R to install packages.

Am I doing anything wrong, or is this the only way packages can be managed when R in installed through conda?

A few sample packages that I needed to install using conda:


tidyverse
tximport
deseq2
apeglm
maftools
sva
Installing packages outside of an R session is arguably the point of using conda.  Package management isn't something that should be done within scripts, only the loading of packages. Doing so ensures that your environment setup is somewhat robust, which should be set before you perform actual calculations.

Using conda install ... is the best way to ensure environment stability here, and, thankfully, lots of people at Bioconductor have worked very hard to make sure bioconda packages fit with the conda framework.

If you need to find packages, you can search online at https://anaconda.org, or from the command line via conda search &lt;pkg&gt;.