'How to fix an R environment variable in Windows 10

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?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source