0

I am currently running R 3.2.4 on windows 10. I have been trying for several days to install the sampleSelectio package without success. i am new in R and I don't know what else to do. i have uinstalled and reinstaled R from version 2.9 to version 3.2.4. but still can't install the sampleSelection package. i keep getting this message:

> install.packages("sampleSelection")

Warning in install.packages : InternetOpenUrl failed: 'A connection with the server could not be established' Installing package into ‘C:/Users/baby/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) Warning in install.packages : dependencies ‘VGAM’, ‘mvtnorm’ are not available

There is a binary version available but the source version is later: binary source needs_compilation sampleSelection 1.0-4 1.2-6 FALSE

installing the source package ‘sampleSelection’

trying URL 'https://cran.rstudio.com/src/contrib/sampleSelection_1.2-6.tar.gz' Content type 'application/x-gzip' length 3068830 bytes (2.9 MB) downloaded 2.9 MB

ERROR: dependencies 'VGAM', 'mvtnorm' are not available for package 'sampleSelection' * removing 'C:/Users/baby/Documents/R/win-library/3.2/sampleSelection' Warning in install.packages : running command '"C:/PROGRA~1/R/R-32~1.4RE/bin/x64/R" CMD INSTALL -l "C:\Users\baby\Documents\R\win-library\3.2" C:\Users\baby\AppData\Local\Temp\RtmpYndmKc/downloaded_packages/sampleSelection_1.2-6.tar.gz' had status 1 Warning in install.packages : installation of package ‘sampleSelection’ had non-zero exit status

The downloaded source packages are in ‘C:\Users\baby\AppData\Local\Temp\RtmpYndmKc\downloaded_packages’

Corine
  • 1

1 Answers1

0

I finally succeeded in installing the sampleSelection package. one plausible explanation is that somme packages are built under different versions of R and somme packages are linked or depend on other packages available in different versions of R. Thus sometimes it is necessary to update our versions of R or downgrade it depending on what package we want to use. The sampleSelection package depends on VGAM and mvtnorm which are under R 3.4.1 and R 3.5.0 respectively. Thus after instaling R 3.5.0, i installed the packages VGAM, mvtnorm and systemfit, miscTools, Ecdat to avoid the error i kept getting only after installing VGAM and mvtnorm.

Thereafter we can successfully >install.packages("sampleSelection")

Sorry if my explanation will seem a little bit confusing. Thank you

Corine
  • 1