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
  • 相关阅读:
    js 与或运算符 || && 妙用(great!!!)
    type of && undefined
    全新框架?微信小程序与React Native的异同之处
    JS-十五章(15.16)
    JS-第十三章
    ValueError: zero-size array to reduction operation maximum which has no identity
    time
    模块
    day8-函数
    day7-format字符串格式化
  • 原文地址:https://www.cnblogs.com/buttonwood/p/2593935.html
Copyright © 2011-2022 走看看