Search code examples
rpackageproject

How can force an R project to use my current libraries instead of installing new ones?


I have downloaded a zip file containing an R project. If I open the xxx.Rproj file R forces it opens some kind of environment with no packages installed, it forces me to install all packages again. But I have a problem, I don't have administrator rights to do it.

How can I force R to ignore all this and just use my current packages.

The project includes an .lock file, a renv folder and other.


Solution

  • Root of the project folder should also include .Rprofile , depending on your system / setup it may or may not be "hidden" . This is what activates renv. You can open it and remove or comment

    source("renv/activate.R")
    

    line.
    Or rename / remove the .Rprofile file itself, if it doesn't include anything else that might have an effect on that specific project.