Giri_Sankar
Giri_Sankar

Reputation: 1

PLS package for R version 3.4.4

I maintain a code base which works on R version 3.4.4. I am trying to use the R package pls. But I can't install and use this package on this version.

code

install.packages("pls") 

returns Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘pls’

Is there any way I can get pls package version which is compatible with R 3.4.4?

Upvotes: 0

Views: 514

Answers (2)

Ben Bolker
Ben Bolker

Reputation: 226332

It's (probably) not that the package is incompatible or archived/no longer available, it's that CRAN isn't making a binary version available for R versions this old (I'm not quite sure why it doesn't fall back to the source version when the binary's not available: what is getOption("pkgType") on your system? I thought the default was "both" ... see ?install.packages).

In particular, if you go to the package web page on CRAN and in particular to the source tarball, you can download/open the tarball and inspect the DESCRIPTION file, particularly these lines:

Depends: R (>= 2.10)
Imports: grDevices, graphics, methods, stats
...
NeedsCompilation: no

This is good news: (1) the "strong dependencies" (Depends/Imports) don't rule out your version of R, and don't include any packages that aren't automatically installed with R (so you won't get into dependency hell); (2) there is no compiled code in the package (so you don't have to mess around with installing development tools).

Worth trying (not easy for me to test): use install.packages() with the URL of the source tarball and repos = NULL:

install.packages('https://cran.r-project.org/src/contrib/pls_2.8-1.tar.gz', 
                 repos = NULL)

It's also possible that install.packages("pls", type = "source") will just work, although in that case I'm not sure why any of your other package installs are working ... ?

Upvotes: 0

Greg3er
Greg3er

Reputation: 35

There is an archive on CRAN with all old versions of the packages. Try this: https://cran.r-project.org/src/contrib/Archive/pls/

Hope that helps!

Upvotes: 1

Related Questions