0

I have a student with a Windows 10 machine that has a bad path set for the R_LIBS_USER variable. I went into the R program directory and edited .Rprofile to set to R_LIBS_USER = "". That works until I am in a project using the renv package. renv apparently uses that variable and it brings the brings the bad path back.

I found this SO post and tried to find the variable it in Control Panel (System Properties -> Advanced system properties -> Environment Variables -> User Variables) but I didn't see the key to delete.

I did a full reinstall of R and the problem is still here.... help.

How can I find/erase that bad path is stored in Windows?

itsMeInMiami
  • 2,324
  • 1
  • 13
  • 34
  • Environment variables are set first in `.Renviron`. See `?Startup` for the details of how that file is found. – user2554330 Feb 27 '22 at 21:00
  • and if you don't see a key to delete in the env var control panel, can you set it to "nothing"? (I haven't tried ... does windows/R deal gracefully with an empty `R_LIBS_USER`?) – r2evans Feb 27 '22 at 21:49
  • Thanks for the tips, I have set it to be "" in the .Renviron file. For better or worse {renv} is finding it. I need a Windows maven to help me kill it in the OS. – itsMeInMiami Feb 28 '22 at 00:20

0 Answers0