Installation failed on Windows 10 (R version 3.4.0)
Hello, I'm trying to install the package on windows 10 machine. I get the following error:
'D:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"D:/Program Files/R/R-3.4.0/bin/x64/R" CMD INSTALL -l "D:\Program Files\R\R-3.4.0\library" C:\Users\Hisham\AppData\Local\Temp\Rtmp4kenP6/downloaded_packages/vtreat_0.5.32.tar.gz' had status 1
Warning in install.packages :
installation of package ‘vtreat’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Hisham\AppData\Local\Temp\Rtmp4kenP6\downloaded_packages’
This is my session info:
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tidyquant_0.5.1 dplyr_0.7.0 purrr_0.2.2.2 readr_1.1.1
[5] tidyr_0.6.3 tibble_1.3.3 ggplot2_2.2.1 tidyverse_1.1.1
[9] quantmod_0.4-9 TTR_0.23-1 PerformanceAnalytics_1.4.3541 xts_0.9-7
[13] lubridate_1.6.0 zoo_1.8-0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.11 cellranger_1.1.0 compiler_3.4.0 plyr_1.8.4 forcats_0.2.0 tools_3.4.0 jsonlite_1.5
[8] nlme_3.1-131 gtable_0.2.0 lattice_0.20-35 rlang_0.1.1 psych_1.7.5 parallel_3.4.0 haven_1.0.0
[15] xml2_1.1.1 stringr_1.2.0 httr_1.2.1 hms_0.3 grid_3.4.0 glue_1.0.0 R6_2.2.1
[22] Quandl_2.8.0 readxl_1.0.0 foreign_0.8-67 modelr_0.1.0 reshape2_1.4.2 magrittr_1.5 scales_0.4.1
[29] rvest_0.3.2 assertthat_0.2.0 mnormt_1.5-5 colorspace_1.3-2 stringi_1.1.5 lazyeval_0.2.0 munsell_0.4.3
[36] broom_0.4.2
Sorry you are having trouble.
vtreat is a pure R package (no C++ or any other external languages used), so it is usually easy to install. The error is indicating that whatever is running the install command has not successfully escaped or quoted the spaces so that "D:/Program Files/R/R-3.4.0/bin/x64/R" doesn't get truncated to "D:/Program". I.e. it fails to find the R executable itself.
Basically something like the PATH or RHOME environment variable is not configured correctly. I would suggest installing the package using the R command line from inside R or RStudio (not using a GUI). The command would be "install.packages('vtreat')".
I would ask: how are you trying to install now? Basically I do not recommend running "R CMD" from the Windows shell, but instead issuing command from inside R (as I mentioned above). Also, are you able to install other packages using the technique you are trying in this case?
The symptom you are seeing is because something is wrong with the environment specified by R or RStudio (if you are using that). Here are some threads of people trying to solve the same issue: https://github.com/ramnathv/slidify/issues/247 https://support.rstudio.com/hc/en-us/community/posts/202871987-Problem-with-path-in-Windows-RStudio-98-1102-immediately-following-upgrade- . https://stackoverflow.com/questions/10077689/r-cmd-on-windows-7-error-r-is-not-recognized-as-an-internal-or-external-comm https://github.com/hadley/devtools/issues/1275
It is a problem, just not one I can diagnose at my end.
Hi John, thanks for your reply ..
I actually tried to install it from inside rstudio as I always do, using install.packages("vtreat") as you mentioned. I saw the same problem posted for other packages by some people. The solution was to uninstall R and Rstudio and re-install them in a folder with no spaces in its name, e.g. c:\R, or anything like that. I tried this solution and it worked.
I spent a lot of time reading your great paper about vtreat. This is actually amazing, because I've run through these problems in my work. Can't wait to apply the package on a kaggle competition I'm working on. The issue of (novel levels in the test set) is present in this competition.
Before using vtreat, I had to do some crazy stuff: merging both train and test sets -> dummyfying the categorical variables, then re-split again. (not sure if that's correct or not?!!) But I think with vtreat the solution is far more elegant.
For sure I will be spending a lot of time to make the most out of this novel package. And definitely will be asking a lot of questions. So I hope you'd bear with me :)
Thanks for being patient Hisham-Hussien, I know how frustrating bringing in packages can be. I hope vtreat turns out to be a benefit. I'll go ahead and close this as you seem to have found a work-around.
Sure .. sorry I forgot to close it .. thanks again John!
On Thursday, June 15, 2017, 7:35:02 AM GMT+2, John Mount [email protected] wrote:
Closed #7.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
No problem and thanks for telling us a bit about your work.
We used to do the "merge train/test and split" ourselves to at least avoid crashing on novel levels.
The vtreat novel level guessing is pretty good for linear models, somewhat less so for tree models. In common cases it is a not so very different than the random forest "always go left on missing values" heuristic. So to get the last bit of performance out on a Kaggle you may also want to play with missing value imputation. However we have found most of those packages error-out in weird situations. The math is simple (replace the missing or novel value with guesses and score more than one row), but there always seem to be operational hitches (which is why we don't currently supply the service).
Thanks John for the insights .. will definitely try them out !
On Thursday, June 15, 2017, 4:15:31 PM GMT+2, John Mount [email protected] wrote:
No problem and thanks for telling us a bit about your work.
We used to do the "merge train/test and split" ourselves to at least avoid crashing on novel levels.
The vtreat novel level guessing is pretty good for linear models, somewhat less so for tree models. In common cases it is a not so very different than the random forest "always go left on missing values" heuristic. So to get the last bit of performance out on a Kaggle you may also want to play with missing value imputation. However we have found most of those packages error-out in weird situations. The math is simple (replace the missing or novel value with guesses and score more than one row), but there always seem to be operational hitches (which is why we don't currently supply the service).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.