GGPlot2 Install Error - Access Denied

Difficulty installing GGPlot2 -

"Error in install.packages : cannot open file 'C:/Users/Mark/Documents/R/win-library/3.5/file2dc851144b08/colorspace/doc/hcl-colors.pdf': Permission denied"

HELP -- Please?

RStudio - Version 1.1.453

Hi! Welcome!

Sorry you're having installation problems -- lots of people stumble on this sort of thing, I'm afraid! One reason for the sort of error you're seeing is a conflict with security restrictions and/or anti-malware software. See here (under "for the second problem"):


Thank you JC.
I did permit access with one of my firewall programs, but not not thee Windows Controlled Folders - will research. I have also attempted to run R Studio as administrator but was denied - which suggests that I need to research this as well.


Good luck! These problems can unfortunately be annoying to track down, since there are a lot of system-specific interacting parts. Definitely post back with any solutions you find, since this could be helpful for other people in the future!

I have had the same problem with .PDF and .PNG files and there may be more with rlang loading rlang.png; glue calling crayon for smacof trying to load ANSI-256-OSX.PDF; stringi has its own logo.png; and I have not exhaustively tried each program that the packages smacof, shiny, and ggplot2 would load.

These all worked about six months ago. My sense is that Microsoft changed Win10, but I do not have an old version to test it. I checked that my usual login directory could be updated, which it could by installing packages up to the point they tripped over a .PDF or .PNG. I tried using the advice at accelebrate tutorials to add a library directory, but Code was not able to save Rprofile even starting it as an administrator. The exercise did show me that my default directory for libraries was under the administrator's directory, as I have been running without problem until hitting the wall late fall, as I posted elsewhere.

It may be that the workaround is to install R (in my case open for a multi-threaded smacof doing Monte Carlo) when signed on as a user. I would like to do it as Public so others can use the computer with R and the libraries.

I will post any progress as I proceed, and perhaps something here is helpful.

1 Like

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