2013年8月28日星期三

升级#R语言不重装packages的方法(Windows系统)

两种方法:
1、在其他目录下安装 #R ,再将旧版本保留的 library 目录下的文件拷贝至新版本 library 目录下,然后update.packages() ;
2、或卸载 #R ,把 #R 装到旧的目录下,然后 update.packages()。

R论坛的官方解释:

-What's the best way to upgrade?

-That's a matter of taste. For most people the best thing to do is to uninstall R (see the previous Q), install the new version, copy any installed packages to the library folder in the new installation, run update.packages(checkBuilt=TRUE, ask=FALSE) in the new R and then delete anything left of the old installation. Different versions of R are quite deliberately installed in parallel folders so you can keep old versions around if you wish.

For those with a personal library (folder R\win-library\x.y of your home directory, R\win64-library\x.y on 64-bit builds), you will need to update that too when the minor version of R changes (e.g. from 3.0.2 to 3.1.0). A simple way to do so is to copy (say) R\win-library\3.0 to R\win-library\3.1 before running update.packages(checkBuilt=TRUE, ask=FALSE).

*: #R 代表统计软件R,这里前面加上“#”便于和其他单词区分开。

没有评论:

发表评论