Hi all !
For some reason I cannot install ggplot2 on my R studio (Version 4.0.3)
I installed Rtools 4 and restarted R and I input the following command :
write('PATH="{RTOOLS40_HOME}\\usr\\bin;{PATH}"', file = "~/.Renviron", append = TRUE)
Then I restarted R and I checked if the path was good :
Sys.which("make")
make
"C:\rtools40\usr\bin\make.exe"
I then tried to install ggplot2 like this :
install.packages("ggplot2", type="source")
And it did not work when I tried to load it it says that there is no package
So i tried again like this :
install.packages("ggplot2")
and got the following errors :
Installing package into ‘C:/Users/milan/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
There is a binary version available but the source version
is later:
binary source needs_compilation
ggplot2 3.3.5 3.4.2 FALSE
installing the source package ‘ggplot2’
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.4.2.tar.gz'
Content type 'application/x-gzip' length 3153811 bytes (3.0 MB)
downloaded 3.0 MB
- installing source package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'pillar' 1.4.7 is being loaded, but >= 1.6.2 is required
Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'ggplot2' - removing 'C:/Users/milan/Documents/R/win-library/4.0/ggplot2'
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\milan\AppData\Local\Temp\RtmpGum1Ss\downloaded_packages’
And it still does not find the package ggplot2, I am starting to be a bit desperate does anybody knows what is wrong?