0

am trying to install package sampling for R version 3.2 but however I am getting the following error:

Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
  unable to access index for repository http://cran.rstudio.com/src/contrib
Installing package into ‘C:/Users/ramaaj-cont/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
  unable to access index for repository http://cran.rstudio.com/src/contrib
Warning in install.packages :
  package ‘sampling’ is not available (for R version 3.2.0)
user76170
  • 173
  • 3
  • 10
  • 2
    Are you trying to install it on a computer connected to the internet? The warning messages in there imply that R cannot talk to your CRAN mirror. Maybe run `chooseCRANmirror()` and choose a different one. – MrFlick May 11 '15 at 15:58

1 Answers1

0

Download the binaries corresponding to your system here:

http://cran.r-project.org/web/packages/sampling/index.html

Then click on "Packages" in your R session, then "Install package(s) from local zip files..." and choose the appropriate file.

You will need the package "lpSolve", so make sure it is installed too.

Julian Wittische
  • 1,219
  • 14
  • 22