I am getting this error while installing packages. Since all my packages are of .zip format and when I install packages with type= "win.binary", everything works well. But any package with package with .tar.gz, it does not work.
Now, I am trying to build a package. I have a installed Rtools and it works. Any suggestions?
But it says: for
devtools::install()
. error;
stack trace;
RTools installation.
Any help will be appreciated. I have gone through stack overflow as well for a solution, but probably got confused. My R version. Any further information can be provided. Thank you
Asked
Active
Viewed 727 times
0

ARU
- 17
- 2
- 7
-
Does the [following](https://stackoverflow.com/questions/61556412/error-message-when-installing-xml2-r-package/61565489) help to answer our question? – tpetzoldt May 18 '20 at 16:05
-
Please do not post an image of code/data/errors: it cannot be copied or searched (SEO), it breaks screen-readers, and it may not fit well on some mobile devices. Ref: https://meta.stackoverflow.com/a/285557 (and https://xkcd.com/2116/). Please just include the code, console output, or data (e.g., `dput(head(x))` or `data.frame(...)`) directly. – r2evans May 18 '20 at 16:13
-
R on windows has some interesting "features", one of which is that R does not always deal with spaces in the path correctly. This is communicated in the error by it looking for `\Users\ILK` vice your real directory of `\Users\ILK Consultancy`. Because of this, I install R in `C:\R\R-3.5.3` (versioned) and most if not all of my projects are accessible via a directory-path free of spaces. Many components of R do just fine, but here it's because it calls an external command, and R's `system` is horribly naive on quoting and spaces and such. – r2evans May 18 '20 at 16:16
-
1Thank you all. , Sure @r2evans I will keep that in mind. I will try to install newer version in a better path without spaces and try this. Thank you and will let you know. – ARU May 18 '20 at 16:27
-
`ERROR: lazy loading failed for package 'package' * removing 'C:/R-3.6.3/library/package' Error: Failed to install 'package ' from GitHub: (converted from warning) installation of package ‘C:/Users/ILK Consultancy/AppData/Local/Temp/RtmpkNU4ko/file8d1426152573/package_1.0.0.tar.gz’ had non-zero exit status`. Though I have changed the path of R installed. But how do I change the temp location where it installs? – ARU May 18 '20 at 17:45
-
Oh I set the temp path like this: `Sys.setenv(TMPDIR = 'C:/R/tmp_R')` Then started installing packages. Worked. Can you post your answer. I think it worked. – ARU May 18 '20 at 18:08