izano
izano

Reputation: 1

Error on installing the tidyverse and ggplot2 packages

I am seeing the following error when trying to install the tidyverse and ggplot2 R package

Error in install.packages : cannot open file 'C:/Users/dell user/Documents/R/win-library/4.1/filebad038967c5e/rlang/help/figures/rlang.png': Permission denied.

How can I go around this?

Upvotes: 0

Views: 594

Answers (1)

GeoSn0w
GeoSn0w

Reputation: 714

It happens because the path where you install them is restricted. To fix this issue:

  1. Run the RStudio as Administrator. If this doesn't fix it:
  2. Sometimes Windows Defender Ransomware Protection can cause issues. Add rsession.exe as an exception.
  3. Change the R library folder (where your packages get installed) to a folder you have access to, like somewhere in your own Documents or Desktop or another path you control.

Upvotes: 0

Related Questions