Hello Fellow enthusiasts,
I use portable version of R for a project in a computer where I have no administrator privilege. I use zip function to encrypt & zip a folder. Apparently computer doesn't have Rtools and I cannot install it. I am wondering how I can point R to look into a local folder where I have Rtools available (with ../bin/zip.exe)
I have tried to add Sys.setenv(zip="folderpath_of_Rtools/bin"
in Rprofile.site But it is not working.
I also tried this syntax, and it is also not working.
Rtools.bin="C:\Users\User_2\R-Portable\Rtools\bin"
sys.path = Sys.getenv("PATH")
if (Sys.which("zip") == "" ) {
system(paste("setx PATH "", Rtools.bin, ";", sys.path, """, sep = ""))
}
The above syntax works. After a reboot, it miraculously worked :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…