RevolutionAnalytics / RRO

Revolution R Open
http://mran.revolutionanalytics.com/download/
GNU General Public License v2.0
86 stars 25 forks source link

R Studio package installation failure with Windows 7 #315

Open probprob14 opened 7 years ago

probprob14 commented 7 years ago

image I tried to import data set, and my RStudio said I should install readr and RCPP. So I allowed them to be installed, but the following message popped up. I wonder what I should do with this. I'm a Windows 7 user.

sfweller commented 7 years ago

This could be a problem in R due to your current locale settings in R.

Can you type:

Sys.getlocale()

and paste your current settings into this discussion thread?

Also, your output above does not indicate what exact R commands you ran to try and install these packages. Can you paste the exact commands you ran in your reply? It looks like you are trying to install a Windows binary zip file for a R package, based on the output shown above.

There are a number of ways to install a R package binary on Windows. How are you doing this? Via the 'Packages' menu, or via 'install.packages()' function or via 'R CMD INSTALL'?

I would try installing the package through another means, if you can't get the first to work.

For example, to install windows binary package from command-line via 'install.packages()' you can download the binary zip file from CRAN to your local PC, for example:

Rcpp URL: 'https://mran.revolutionanalytics.com/snapshot/2015-11-30/bin/windows/contrib/3.2/Rcpp_0.12.2.zip'

Then, to install via 'install.packages()' in R console window: install.packages('C:/Rdownloads/Rcpp_0.12.2.zip', repos = NULL, type = 'win.binary')

Try this, and let me know if it works for you.

Stephen Weller Microsoft R Open Product Team

probprob14 commented 7 years ago

Hi! I got ["LC_COLLATE=English_Belize.1252;LC_CTYPE=English_Belize.1252;LC_MONETARY=English_Belize.1252;LC_NUMERIC=C;LC_TIME=English_Belize.1252"] when I typed in Sys.getlocale() as you requested.

I clicked the button 'Import Dataset' - 'From CSV' option, then the following message popped up: image

So it seems like I tried to install a R package binary via the 'Packages' menu.

When I use the install.packages(), I also get the message [Error in download.file(url, destfile, method, mode = "wb", ...) : cannot open destfile 'C:\Users\정연윤\AppData\Local\Temp\RtmpQL7OMl/downloaded_packages/tibble_1.3.0.zip', reason 'No such file or directory'] as well...

sfweller commented 7 years ago

Thanks for including the screenshot, This definitely looks like a locale settings problem.

I suggest that you try running these lines in your Rscript, before running your code: Sys.setlocale("LC_MESSAGES", 'en_GB.UTF-8') Sys.setenv(LANG = "en_US.UTF-8")

For a discussion of similar problems, you may also want to take a look at this stackoverflow thread. I don't think that this is an issue specific to Microsoft R Open, but a general limitation in language specific settings in R. Hopefully, the above workaround will work for you.

http://stackoverflow.com/questions/16347731/how-to-change-the-locale-of-r-in-rstudio

Stephen Weller