I trying to install ggplot2 and I am having this error some help please.

install.packages("ggplot2")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/olufe/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rstudioapi’, ‘evaluate’, ‘pkgload’, ‘praise’, ‘colorspace’, ‘assertthat’, ‘utf8’, ‘Rcpp’, ‘testthat’, ‘farver’, ‘labeling’, ‘munsell’, ‘R6’, ‘RColorBrewer’, ‘viridisLite’, ‘lifecycle’, ‘cli’, ‘crayon’, ‘ellipsis’, ‘fansi’, ‘magrittr’, ‘pillar’, ‘pkgconfig’, ‘vctrs’, ‘digest’, ‘glue’, ‘gtable’, ‘isoband’, ‘rlang’, ‘scales’, ‘tibble’, ‘withr’

There is a binary version available but the source version is later:
binary source needs_compilation
rlang 0.4.5 0.4.6 TRUE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/ggplot2_3.3.0.zip'
Content-type 'application/zip' length 4021298 bytes (3.8 MB)
downloaded 3.8 MB

library("ggplot2") # Make package available; often used for loading in scripts
Error in library("ggplot2") : there is no package called ‘ggplot2’

Error in install.packages: cannot open file 'C:/Users/olufe/Documents/R/win-library/3.6/file9a07a981388/rstudioapi/help/figures/logo.png': Permission denied

Can you post the whole error message you get when you try to install ggplot2? It seems to me like you are omitting some important parts.

Also, please post it as formatted code to make it easier to read, here is how to do it

1 Like

I have same problem when i want to install packages.
I try to solve installing Rtools in the path where R installer

C:\Program Files\R\R-3.6.3\bin\x64

but there is new warning

WARNING: Rtools is required to build R packages, but the version of Rtools previously installed in C:/Program Files/R/R-3.6.3/bin/x64/rtools40 has been deleted.

I don't know how to do now

I mean, even the installation package procedure keep working, but in the end the installation failed

Rtools40 is for being used with R 4.0.0 for your R version you need Rtools35

https://cran.r-project.org/bin/windows/Rtools/history.html

1 Like

I'm sure this is the answer, i 'm working on it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.