7

更新が必要なパッケージのリスト、つまりパッケージ名、現在インストールされているバージョン、およびリポジトリで利用可能なバージョンを含む表を作成するにはどうすればよいですか?

、をハックpackageStatus()しようとしましたがinstalled.packages()update.packages()これらの関数で目的の出力を生成するように強制することはできません。

これらのパッケージを実際に更新したくないことに注意してください。言及されたリストを見たいだけです。

4

2 に答える 2

7

をご覧くださいold.packages()。私のシステムでは:

R> old.packages()
              Package         LibPath                                   Installed   Built   ReposVer    Repository                           
bnlearn       "bnlearn"       "/home/gavin/R/build/3.0-patched/library" "3.4"       "3.0.2" "3.5"       "http://cran.rstudio.com/src/contrib"
deldir        "deldir"        "/home/gavin/R/build/3.0-patched/library" "0.1-4"     "3.0.2" "0.1-5"     "http://cran.rstudio.com/src/contrib"
devtools      "devtools"      "/home/gavin/R/build/3.0-patched/library" "1.3"       "3.0.2" "1.4.1"     "http://cran.rstudio.com/src/contrib"
digest        "digest"        "/home/gavin/R/build/3.0-patched/library" "0.6.3"     "3.0.2" "0.6.4"     "http://cran.rstudio.com/src/contrib"
extrafont     "extrafont"     "/home/gavin/R/build/3.0-patched/library" "0.15"      "3.0.2" "0.16"      "http://cran.rstudio.com/src/contrib"
forecast      "forecast"      "/home/gavin/R/build/3.0-patched/library" "4.8"       "3.0.2" "5.1"       "http://cran.rstudio.com/src/contrib"
foreign       "foreign"       "/home/gavin/R/build/3.0-patched/library" "0.8-57"    "3.0.2" "0.8-59"    "http://cran.rstudio.com/src/contrib"
Matrix        "Matrix"        "/home/gavin/R/build/3.0-patched/library" "1.1-0"     "3.0.2" "1.1-2"     "http://cran.rstudio.com/src/contrib"
matrixStats   "matrixStats"   "/home/gavin/R/build/3.0-patched/library" "0.8.12"    "3.0.2" "0.8.14"    "http://cran.rstudio.com/src/contrib"
mgcv          "mgcv"          "/home/gavin/R/build/3.0-patched/library" "1.7-27"    "3.0.2" "1.7-28"    "http://cran.rstudio.com/src/contrib"
mvtnorm       "mvtnorm"       "/home/gavin/R/build/3.0-patched/library" "0.9-9996"  "3.0.2" "0.9-9997"  "http://cran.rstudio.com/src/contrib"
party         "party"         "/home/gavin/R/build/3.0-patched/library" "1.0-11"    "3.0.2" "1.0-13"    "http://cran.rstudio.com/src/contrib"
R.methodsS3   "R.methodsS3"   "/home/gavin/R/build/3.0-patched/library" "1.5.2"     "3.0.2" "1.6.1"     "http://cran.rstudio.com/src/contrib"
raster        "raster"        "/home/gavin/R/build/3.0-patched/library" "2.2-5"     "3.0.2" "2.2-12"    "http://cran.rstudio.com/src/contrib"
Rcpp          "Rcpp"          "/home/gavin/R/build/3.0-patched/library" "0.10.6"    "3.0.2" "0.11.0"    "http://cran.rstudio.com/src/contrib"
RcppArmadillo "RcppArmadillo" "/home/gavin/R/build/3.0-patched/library" "0.3.920.1" "3.0.2" "0.4.000.2" "http://cran.rstudio.com/src/contrib"
rgl           "rgl"           "/home/gavin/R/build/3.0-patched/library" "0.93.991"  "3.0.2" "0.93.996"  "http://cran.rstudio.com/src/contrib"
rpart         "rpart"         "/home/gavin/R/build/3.0-patched/library" "4.1-3"     "3.0.2" "4.1-5"     "http://cran.rstudio.com/src/contrib"
scatterplot3d "scatterplot3d" "/home/gavin/R/build/3.0-patched/library" "0.3-34"    "3.0.2" "0.3-35"    "http://cran.rstudio.com/src/contrib"
survival      "survival"      "/home/gavin/R/build/3.0-patched/library" "2.37-4"    "3.0.2" "2.37-7"    "http://cran.rstudio.com/src/contrib"

特定の要件について:

R> old.packages()[, c("Package","Installed","ReposVer")]
              Package         Installed   ReposVer   
bnlearn       "bnlearn"       "3.4"       "3.5"      
deldir        "deldir"        "0.1-4"     "0.1-5"    
devtools      "devtools"      "1.3"       "1.4.1"    
digest        "digest"        "0.6.3"     "0.6.4"    
extrafont     "extrafont"     "0.15"      "0.16"     
forecast      "forecast"      "4.8"       "5.1"      
foreign       "foreign"       "0.8-57"    "0.8-59"   
Matrix        "Matrix"        "1.1-0"     "1.1-2"    
matrixStats   "matrixStats"   "0.8.12"    "0.8.14"   
mgcv          "mgcv"          "1.7-27"    "1.7-28"   
mvtnorm       "mvtnorm"       "0.9-9996"  "0.9-9997" 
party         "party"         "1.0-11"    "1.0-13"   
R.methodsS3   "R.methodsS3"   "1.5.2"     "1.6.1"    
raster        "raster"        "2.2-5"     "2.2-12"   
Rcpp          "Rcpp"          "0.10.6"    "0.11.0"   
RcppArmadillo "RcppArmadillo" "0.3.920.1" "0.4.000.2"
rgl           "rgl"           "0.93.991"  "0.93.996" 
rpart         "rpart"         "4.1-3"     "4.1-5"    
scatterplot3d "scatterplot3d" "0.3-34"    "0.3-35"   
survival      "survival"      "2.37-4"    "2.37-7" 
于 2014-02-18T15:36:06.410 に答える
6

機能を知っていますold.packages()か?

からhelp(update.packages):

 ‘old.packages’ indicates packages which have a (suitable) later 
 version on the repositories whereas ‘update.packages’ offers to
 download and install such packages.
于 2014-02-18T15:35:58.583 に答える