I\'m running Ubuntu 16.04 [now 17.04: see note in bold below] and R 3.4.1. I installed the latter this morning, so I presume it\'s the latest version. I want to install Tidy
I believe had a similar problem trying to install the tidyverse package. Being reasonably new to Linux and a complete rookie to R, I followed the Ubuntu installation intructions on the CRAN Project's homepage. When I installed R, I deliberately skipped installation of the r-base-dev package, as it said it was intended for "package maintainers". I didn't really read the latter part or understand the necessity for compiling packages myself.
Anyway, installing r-base-dev
package, and allowed me to install the Tidyverse package without problems. The complete steps to get it to work should be something like below. In terminal do the following steps (Step 1-3 may or may not be necessary, but I've added them just in case):
deb https:///bin/linux/ubuntu artful/
in your /etc/apt/sources.list
file, replacing by the actual URL of your favorite CRAN mirror. See https://cran.r-project.org/mirrors.html for the list of CRAN mirrors.Add the repository key to your system:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
An alternate method can be used by retrieving the key with
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
and then feed it to apt-key with
gpg -a --export E084DAB9 | sudo apt-key add -
To install the complete R system, use
sudo apt-get update
sudo apt-get install r-base
Then comes the step I missed, that proved crucial to be able to compile the packages within the Tidyverse package, namely installing the r-base-dev
package:
sudo apt-get install r-base-dev
Then in RStudio execute the package installation command:
install.packages(tidyverse)
Hopefully this will work for you as well. Read the installation guide on the CRAN Projects homepages for further about the installation procedure.