Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
486 views
in Technique[技术] by (71.8m points)

zip - Rtools with R portable

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...