0

I am using R on my work computer inside of our Network. Naturally, I do not have admin rights and It would be hard to convince my IT Department to make an exception for me installing Rtools on my computer.

My main issue with not having Rtools is, that I cannot use the saveWorkbook command from openxlsx, which would allow me to save data as Excel table objects.

The Error of the command implies that I could use an alternative zip application:

 Please make sure Rtools is installed or a zip application is available to R

Would this be possible? Our work Computers have 7-zip for instance.

In line with the comment of @Tung and others I copied a Folder of Rtools from my private Computer to my work Computer. I tried the following to no avail

Rtools.bin="C:\\Rtools\\bin"
sys.path = Sys.getenv("PATH")
if (Sys.which("zip") == "" ) {
  system(paste("setx PATH \"", Rtools.bin, ";", sys.path, "\"", sep = ""))
}

I also tried using Sys.setenv("R_ZIPCMD" = "C:/Program Files/7-Zip/7zG.exe") to use 7 zip but then I get an error messan Incorrect Switch postfix: -r1

I am specifally trying to replicate the writeDataTable example from openxlsx

Max M
  • 806
  • 14
  • 29
  • I think my Problem is rather specific. I would like to use openxlsx but cannot because i cannot install Rtools. The error message of openxls says that I should make sure that Rtools is installed or a zip application is available to R. I would like to know if I can use another zip application with R and which one. Preferably, my Computer already has 7zip installed – Max M Apr 17 '18 at 15:40
  • Fair point, I didn't read in enough detail. :) – underscore_d Apr 17 '18 at 15:41
  • Ok :) any suggestions what tags would attract more attention – Max M Apr 17 '18 at 16:05
  • Not as full featured as openxlsx, but to read/write Excel files the `readxl` package does not have any external dependencies – Dave2e Apr 17 '18 at 16:53
  • This might help https://stackoverflow.com/questions/34368287/rtools-with-r-portable – Tung Apr 18 '18 at 00:06

0 Answers0