更新软件包并防止其恢复原始状态 [英] Update a package and keep it from reverting to the original

查看:132
本文介绍了更新软件包并防止其恢复原始状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想升级包ggplot2:

  library(ggplot2)
packageDescription(ggplot2)[ 版本]
> 0.8.3

但目前的版本为0.8.7。

我尝试了update.packages(),这似乎工作正常。但是它仍然返回了旧版本0.8.3。所以我下载并安装了来自Cran的包源代码,它在下载页面中显示0.8.7。
然后通过R中的GUI菜单安装它。它返回

  **构建包索引... 
* DONE(ggplot2)

然后运行:

  packageDescription(ggplot2)[Version] 
> 0.8.3

还有我的旧版本!



我不知道为什么这不起作用,更重要的是我之前已经遇到过这个问题并解决了它(我不记得具体是什么),但现在它已经回到了旧版本!什么是最简单的方法来保持这样的包自动更新,而不是让他们引用回旧的包?

你正在用吗? CRAN二进制文件只保持最新的R版本(即2.10.1)。如果你有一个旧版本的R并且安装了开发工具,你可以使用 install.packages(ggplot2,type =source)


I want to upgrade the package ggplot2:

library(ggplot2)
packageDescription("ggplot2")["Version"]
> 0.8.3

But the current version is 0.8.7.

I tried update.packages(), which seemed to work OK. But it still returned older version 0.8.3.

So I downloaded and installed the package source from Cran, which says 0.8.7 in the download page. I then install it via the GUI menu in R. It returns

** building package indices ...
* DONE (ggplot2)

I then run:

packageDescription("ggplot2")["Version"]
> 0.8.3

And still I have the older version!

I don't know why this is not working, what's more I had already come across this problem before and solved it (I can't remember exactly what) but now it has gone back to the older version! What's the easiest way to keep packages like this updated automatically and not have them refer back to older packages?

解决方案

What version of R are you using? CRAN binaries are only kept up-to-date for the latest R release (i.e. 2.10.1). If you have an older version of R and have the development tools installed, you can use install.packages("ggplot2",type="source").

这篇关于更新软件包并防止其恢复原始状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆