I am trying to install devtools
in my RStudio. But I get tons of errors:
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unp
None of the above answers worked for me on Ubuntu 18.04.3 LTS using R version 3.6.1
My guess is this might have something to do with Anaconda3
...
What worked for me is:
conda install -c r r-devtools
Then in R
install.packages("rlang")
install.packages("devtools")
I should mention that conda as a package manager for R works great but you should stick to conda as much as you can, i.e. DON'T INSTALL PACKAGES IN R
, BUT WITH CONDA (unless there is not a recipe for that package) using either conda-forge
, bioconda
, and defaults
channels (open-source channels); being careful not to mix with proprietary channels (e.g. anaconda
, r
).
When you need packages that are not available in the channel set you are using, you must install them by hand into an external location outside of the conda environment. For example, .libPaths()
shows I have two libraries:
/home/tsundoku/anaconda3/lib/R/library
# where anaconda packages are stored/usr/lib/R/library
# where I store packages in external locationFor a good read on managing .libPaths()
see @MilesMcBain's blog-post here