Receiving error when installing ggplot2

I’m sorry you’re still having trouble! Unfortunately, we’re getting to the sort of really system-specific stuff that can be challenging to debug from afar. Some questions/things to try:

  1. Are you running RStudio as administrator when you install packages, in addition to changing your anti-virus settings?
  2. Since R moves things around a bit during installation (which can look suspicious to anti-malware software), you might try making the exclusion path the entire C:/Users/Patricia/Documents/R/ directory.
  3. I have heard some people in this situation say they have more success installing packages (as administrator) from R, rather than from RStudio — not sure if that’s for real or not, but I guess it might look different from the perspective of the anti-malware program.
  4. Are you on a computer where somebody else has influence over the anti-malware configuration (such as a work computer)? If so, you might need to talk to them.
  5. Moving your R library somewhere other than your User directory sometimes helps, since the stuff in that directory gets extra attention from anti-malware software (due to the threat of ransomware, mostly). There’s a good discussion of different ways to do this here: Help regarding package installation: .Renviron, .Rprofile, R_LIBS, R_LIBS_SITE, and R_LIBS_USER Oh my!
1 Like