Force install.packages()

Is it possible to install a package in R forcefully ?

> install.packages("gsubfn")
Installing package(s) into ‘/home/sebastian/R/x86_64-unknown-linux-gnu-library/2.14’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘gsubfn’ is not available (for R version 2.14.2)

In this case the package requires R >= 2.15 and I only have R 2.14.2 . Wondering whether I can do a force install .


Download the package from the source. Unzip it, and move the folder to the library (~/R/2.14/Library). Go to your IDE and do a library(<package_name>)

This may or may not work properly and you are most likely to get a similar warning message saying that package <name> was built under R 2.14 . Ignore it. Most of the functions should work. Be warned, however, there may be some functions which spew funny output, or none at all, as they might be using some features which are not in R 2.14.

You could, however, update your R version. That, IMO, is the best way to go.

链接地址: http://www.djcxy.com/p/59184.html

上一篇: 我如何追踪/修复龙卷风中的内存泄漏

下一篇: 强制install.packages()