Reputation: 570
I am trying to install the Gains package in R Studio Version 3.1.2 like this: install.packages("gains")
The following warnings appear: InternetOpenUrl failed: 'The server name or address could not be resolved' Warning in install.packages :unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.1 Warning in install.packages :package ‘gains’ is not available (for R version 3.1.2)
Does anyone know how can I fix this?
Thanks!
Upvotes: 0
Views: 1675
Reputation: 2482
I believe that the problem lies in your corrupted, incomplete or otherwise incorrect R
environment. I was able to install that package without any problems at all just by issuing the default command:
> install.packages("gains")
Installing package into ‘C:/Users/Alex/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/gains_1.1.zip'
Content type 'application/zip' length 35802 bytes (34 Kb)
opened URL
downloaded 34 Kb
package ‘gains’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Alex\AppData\Local\Temp\RtmpSSRths\downloaded_packages
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] tools_3.1.1
As a quick solution to the problem, I suggest to specify CRAN mirror explicitly:
install.packages("gains", repos = "http://cran.rstudio.com")
Upvotes: 0