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
  • 相关阅读:
    java throws处理
    java 对象的向下转型
    模仿百度三维地图的js数据
    MyEclipse:Address already in use
    Javascript 的addEventListener()及attachEvent()区别分析
    Javascript获得URL参数
    filter : progid:DXImageTransform.Microsoft.AlphaImageLoader
    TortoiseSVN使用简介(来自网络)
    javascript控制鼠标中键滑动
    跨浏览器实现自定义事件处理
  • 原文地址:https://www.cnblogs.com/buttonwood/p/2593935.html
Copyright © 2011-2022 走看看