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:
- Are you running RStudio as administrator when you install packages, in addition to changing your anti-virus settings?
- 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. - 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.
- 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.
- 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!