简体   繁体   English

在r中安装旧版本的dplyr(0.12)

[英]install an old version of dplyr (0.12) in r

I'm wondering if there is a way to install (or just use) and old version of dplyr. 我想知道是否有办法安装(或只是使用)和旧版本的dplyr。 I wrote some code in version 0.12 and since then "do()" has been overhauled and it's breaking my code all over the place. 我在版本0.12中编写了一些代码,从那时起“do()”已经彻底检查,并且它在整个地方都破坏了我的代码。 I will update things to fix it, but in the mean time i'd like to get my code to run. 我会更新一些东西来修复它,但同时我想让我的代码运行。 Any suggestions? 有什么建议么?

Thank you 谢谢

Use install_github function from devtools package for this: 使用devtools包中的install_github函数:

devtools::install_github("hadley/dplyr@v0.1.2")

Also you can use CRAN archive and install_url function: 您还可以使用CRAN archiveinstall_url函数:

devtools::install_url("http://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.1.2.tar.gz")

You can also download the zip of the package from CRAN and then install the package from the local zip file. 您也可以从CRAN下载软件包的zip,然后从本地zip文件安装软件包。 This way you can download an older version (if still available on CRAN or you can find it somewhere else) and install that. 这样您就可以下载旧版本(如果仍然可以在CRAN上使用,或者您可以在其他地方找到它)并安装它。 Both RStudio and RGui have specific buttons that help you with this. RStudio和RGui都有特定的按钮来帮助你。 As for the specific function call, I believe it doesn't have to be through devtools, but it can also be something like this 至于具体的函数调用,我相信它不一定是通过devtools,但它也可以是这样的

install.packages("path_to_your_package.zip", repos = NULL)

And it will install it to your default R library folder. 它会将它安装到您的默认R库文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM