如何确定哪个R软件包的较旧版本与我的R版本兼容 [英] How to determine which older version of the R package is compatible with my R version

查看:701
本文介绍了如何确定哪个R软件包的较旧版本与我的R版本兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装"tm"软件包,但随后出现错误消息,说"tm"不适用于我的R版本

I am trying to install the "tm" package but then I get an error saying that "tm" is not available for my R version

package ‘tm’ is not available (for R version 3.0.2)

但是后来我看到有人建议我从

But then I saw that someone suggested I download the archived version from

http://cran.r-project.org/src/contrib/Archive/tm/?C=M;O=A

,然后尝试从源代码安装.

and then try installing from source.

我的问题是如何确定列表中的哪个文件与我的R版本兼容?

My question is how do I determine which file there in the list is compatible with my R version?

推荐答案

您可以使用 METACRAN镜像:

转到您感兴趣的程序包的DESCRIPTION文件的 blame 页面.

Go to the blame page of the DESCRIPTION file of the package you're interested in.

例如对于tm: https://github.com/cran/tm/blame/master/描述

找到Depends行,并根据需要在查看此更改之前的视图责备图标上单击所需的次数,直到显示足够旧的R版本.

Find the Depends line and click as many times as needed on the View blame prior to this change icon, until an old enough R version is displayed.

如果您想自动化,最好使用 crandb (同样来自METACRAN).

If you want to automate that, it may be better to use crandb (also from METACRAN).

旁注:有时程序包作者将R (≥ x.y.z)列为依赖项只是为了安全起见,因为他们使用版本x.y.z并且未对先前版本进行任何测试.

Side note: sometimes package authors list R (≥ x.y.z) as a dependency just to be safe because they use version x.y.z and didn't do any tests with previous versions.

这篇关于如何确定哪个R软件包的较旧版本与我的R版本兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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