zoukankan      html  css  js  c++  java
  • Updating an R installation

    Updating an R installation

    update.packages() function can be used to download and install the most recent  version of a contributed package.

    http://cran.r-project.org/bin

    The installed.packages() function is used to save a list of packages to a location  outside of the R director y tree, and then the list is used with the install.packages()  function to download and install the latest contributed packages into the new R installation.

    Here are the steps:

    1 If you have a customized Rprofile.site file (see appendix B), save a copy outside of R.

    2 Launch your current version of R and issue the following statements

    oldip <- installed.packages()[,1]

    save(oldip, file="path/installedPackages.Rdata")

    where path is a director y outside of R.

    3 Download and install the newer version of R.

    4 If you saved a customized version of the Rprofile.site file in step 1, copy it into the new installation.

    5 Launch the new version of R, and issue the following statements

    load("path/installedPackages.Rdata")

    newip <- installed.packages()[,1]

    for(i in setdiff(oldip, newip))

      install.packages(i)

    eg:

    oldip <- installed.packages()[,1]
    save(oldip, file="D:\\app\\rlib\\installedPackages.Rdata")

    # down load from http://cran.r-project.org/
    load("D:\\app\\rlib\\installedPackages.Rdata")
    newip <- installed.packages()[,1]
    for(i in setdiff(oldip, newip))
    install.packages(i)

     

     

    where path is the location specified in step 2.

    6 Delete the old installation (optional).

     

    source(http://bioconductor.org/biocLite.R)

    biocLite("globaltest")

    biocLite("Biobase")

    tanhao2013@foxmail.com || http://weibo.com/buttonwood
  • 相关阅读:
    爱奇艺笔试题 输出01020304... ...
    ThreadPoolExecutor 中为什么WorkQueue会在corePoolSize满了之后入队
    jvisualvm 的使用
    连续子数组的最大和
    最长连续子序列
    leetcode 需要了解的知识点储备
    java String
    mysql MVCC
    java 批量导出(zip文件)
    java 中接口调用
  • 原文地址:https://www.cnblogs.com/buttonwood/p/2593935.html
Copyright © 2011-2022 走看看