Issue: Rstudio CRAN repository has removed a number of packages which now can be found in their archive. Reference: https://cran.r-project.org/src/contrib/Archive/
If you try to install such package you will get a warning that this package is no longer available.
Example:
> install.packages('RSQLServer')
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘RSQLServer’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Solution: To continue using such packages you can install them with the following code:
> url <- "https://cran.r-project.org/src/contrib/Archive/RSQLServer/RSQLServer_0.3.0.tar.gz"
> pkgFile <- "RSQLServer_0.3.0.tar.gz"
> download.file(url = url, destfile = pkgFile)
trying URL 'https://cran.r-project.org/src/contrib/Archive/RSQLServer/RSQLServer_0.3.0.tar.gz'
Content type 'application/x-gzip' length 633887 bytes (619 KB)
==================================================
downloaded 619 KB
> install.packages(pkgs=pkgFile, type="source", repos=NULL)
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘RSQLServer’ ...
** package ‘RSQLServer’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (RSQLServer)
> library("RSQLServer")
Comments
0 comments
Please sign in to leave a comment.