Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openxlsx does not find RTools #111

Closed
RomanBi opened this issue Jul 31, 2015 · 12 comments
Closed

openxlsx does not find RTools #111

RomanBi opened this issue Jul 31, 2015 · 12 comments

Comments

@RomanBi
Copy link

RomanBi commented Jul 31, 2015

Hey,

I installed openxlsx and it works perfectly on my desktop, however it does not work on my notebook. The versions of RTools, R and openxlsx are the same.

saveWorkbook(wb, file = "dq", overwrite = TRUE)
Error: zipping up workbook failed. Please make sure Rtools is installed or a zip application is     available to R.
Try installr::install.rtools() on Windows.
installr::install.rtools()
No need to install Rtools - You've got the relevant version of Rtools installed
saveWorkbook(wb, file = "dq", overwrite = TRUE)
Error: zipping up workbook failed. Please make sure Rtools is installed or a zip application is available to R.
Try installr::install.rtools() on Windows.

There is one closed error report describing the same problem. It could be solved be deinstallation of RTools, cleaning the registry and reinstallation of RTools. However, this did not work for me.

Thanks

@awalker89
Copy link
Owner

when you do
system("PATH") do you the path to "Rtools\bin" in the result?

@RomanBi
Copy link
Author

RomanBi commented Jul 31, 2015

Oh... you are right. I forgot to set the path variable when installing Rtools, Sys.getenv("PATH") told me. Works perfectly now.

Thank you, Alex!

@RomanBi RomanBi closed this as completed Jul 31, 2015
@samot79
Copy link

samot79 commented Jan 10, 2016

Sorry to bump this thread but I have the exact same problem. I have no idea how to "set the path variable".. Can you please help me?

saveWorkbook(wb, "writeDataExample.xlsx", overwrite = TRUE)
Error: zipping up workbook failed. Please make sure Rtools is installed or a zip application is available to R.
Try installr::install.rtools() on Windows.

installr::install.rtools()
No need to install Rtools - You've got the relevant version of Rtools installed

@awalker89
Copy link
Owner

I've added a vignette to explain this. During the install of Rtools you need to tick the box to edit the system PATH

image

An alternative to this is to set it within the R session with

Sys.setenv("R_ZIPCMD" = "C:/Rtools/bin/zip.exe") ## path to zip.exe

@samot79
Copy link

samot79 commented Jan 12, 2016

Worked perfect. Thanks a lot :)

Date: Mon, 11 Jan 2016 02:03:09 -0800
From: notifications@github.com
To: openxlsx@noreply.github.com
CC: samot1979@hotmail.com
Subject: Re: [openxlsx] openxlsx does not find RTools (#111)

I've added a vignette to explain this. During the install of Rtools you need to tick the box to edit the system PATH

An alternative to this is to set it within the R session with

Sys.setenv("R_ZIPCMD" = "C:/Rtools/bin/zip.exe") ## path to zip.exe


Reply to this email directly or view it on GitHub.

@mubashirqasim
Copy link

Hi there, how about this error on Linux?

@tmamiya
Copy link

tmamiya commented Apr 22, 2016

Hi Alex, I was curious also about Linux. I think i need to set the R_ZIPCMD system variable: however don't know where to set it to, I have installed zip, but don't know where it is in rhel. Any help would be appreciated.

@tmamiya
Copy link

tmamiya commented Apr 22, 2016

Nm figured it out.
For those out there who are looking for Rtools in linux, you can use zip as an alternative.

  1. install zip into linux
  2. set your path (using command below) to that location for me it was /usr/bin/zip
    Sys.setenv(R_ZIPCMD= "/usr/bin/zip")

@Anto58
Copy link

Anto58 commented May 20, 2016

Hi Alex,
I'm having the same problem and I've read your vignette on Installation of openxlsx. Sys.getenv("R_ZIPCMD") shows that I do indeed have a path to C:/Rtools/bin/zip.exe, but if I run shell("zip"), I get:

zip diagnostic: GetVolumeInformation failed
adding: - (deflated 0%)
PK��-

I think the loadWorkbook function is working as a get an object in my environment but when I try the saveWorkbook function I get the message that RomanBi reported in his/her original message.

I don't know if it is relevant that I am working on a system where I don't have administrator rights and can't alter things on the C drive.

I'm a novice in these things and any help you can provide would be much appreciated.
Thanks, Susan

@jabowery
Copy link

jabowery commented Aug 7, 2017

I've recently had to switch from Linux to Windows and find the instructions for installing R on Windows need cleaning up. Even though Rtools is big, it isn't really an optional component for serious use. Rather than challenging the user with the modification of the PATH, that point in the install should offer the option of downloading the 100M Rtools package and modify the PATH at the same time.

More to the point of the present topic, telling people what they should have done during install after the fact isn't helpful. Moreover, telling them that (in the likely event they didn't pre-install Rtools before installing R) such an essential component should be made available by modifying the PATH at the start of every R session -- rather than telling them how to permanently modify the PATH as though they had done so during install -- is not very helpful.

@awalker89
Copy link
Owner

@jabowery does this have anything to do with this specific R package (openxlsx)?

@jabowery
Copy link

jabowery commented Oct 16, 2017

My point is that openxlsx/issues/111 isn't an openxlsx issue at all. It is an R installation issue and should be raised as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants