I started with the R language today, but I had some problems installing packages.
To illustrate my problem, I will try to install the ggplot2
package with the command
install.packages("ggplot2")
After executing this command, this message appears
That sounds good to me, but when I try to import this module
I think this error occurred due to the multiple locations for the library paths
But I tried to install in all these paths and the error continues
install.packages("ggplot2", lib=`libpath`)
I also tried to install on RStudio
But errors continued...
I've never worked with R before, so does anyone have any ideas to avoid these mistakes?
System Infos
-
OS:
Linux Mint 19.3 -
Kernel:
Linux 5.0.0-32-generic -
Architecture:
x86-64 -
R Version:
3.6.3 -
RStudio Version:
1.2.5033
Top comments (3)
Glad you solved it :)
Incidentally, non-zero exit status actually tends to mean something didn't work.
In R we have a few tools available to us to manage packages in addition to the built in ones. Packrat has been a default solution for a long time, but now I think renv is going to soon replace it.
Any idea why the
apt install build-essential
solved it? I guess it might be as you needed to do local builds from the source code as opposed to pulling a new tarball in?I'm going to guess this installs the GCC toolchain which R would need to compile those packages for my distro since CRAN does not provide binary packages for linux...
The command apt install build-essential solved this.