[英]install old package R
i'm working in Rstudio version 0.98.507.0 and R 3.1.1. 我正在使用Rstudio 0.98.507.0和R 3.1.1。 I'm working in a virtual machine, i can not install anything in the computer (professional computer and it's take so long to get authorization for new installation) 我在虚拟机上工作,无法在计算机上安装任何东西(专业计算机,并且需要很长时间才能获得新安装的授权)
i'm looking to install package " plotly " but this package require " dplyr " to work; 我要安装“ plotly ”软件包,但此软件包需要“ dplyr ”才能工作; The current version of " dplyr " is only working with R version 3.1.2 当前版本的“ dplyr ”仅适用于R版本3.1.2
as well i'm trying to install an older version of "dplyr but nothing works. i downloaded the files from cran. i put the file in the directory and here are the code i have tryied and the error message i got: 以及我正在尝试安装旧版本的“ dplyr,但无济于事。我从cran下载了文件。我将文件放在目录中,这是我尝试过的代码和收到的错误消息:
1) 1)
install.packages("J:/ PATH TO THE FILE/dplyr_0.7.0.tar.gz",repos = NULL, type="source")
the error is: 错误是:
Warning: invalid package 'J:/ PATH/dplyr_0.7.0.tar.gz'
Error: ERROR: no packages specified
Warning in install.packages :
running command '"Q:/R.001/R-31~1.1/bin/i386/R" CMD INSTALL -l "C:\Users\I0368711\Documents\R\win-library\3.1" "J:/PATH/R/dplyr_0.7.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘J:/PATH/dplyr_0.7.0.tar.gz’ had non-zero exit status
2) Then i tried to set the working directory, and i run 2)然后我尝试设置工作目录,然后运行
install.packages("dplyr_0.7.0.tar.gz",repos = NULL, type="source")
the error message is 错误消息是
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
PATH TO THE FILE
Warning: invalid package 'dplyr_0.7.0.tar.gz'
Error: ERROR: no packages specified
Warning in install.packages :
running command '"Q:/R.001/R-31~1.1/bin/i386/R" CMD INSTALL -l "C:\Users\I0368711\Documents\R\win-library\3.1" "dplyr_0.7.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘dplyr_0.7.0.tar.gz’ had non-zero exit status
Warning in install.packages :
running command '"Q:/R.001/R-31~1.1/bin/i386/R" CMD INSTALL -l "C:\Users\I0368711\Documents\R\win-library\3.1" "dplyr_0.7.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘dplyr_0.7.0.tar.gz’ had non-zero exit status
3) 3)
i tried another solution: 我尝试了另一种解决方案:
install_version("dplyr", version = "0.7.0", repos = "http://cran.us.r-project.org")
the error message is: 错误消息是:
Error in as.POSIXct.default(value) :
do not know how to convert 'value' to class “POSIXct”
4) the last solution i tried is: 4)我尝试的最后一个解决方案是:
path<- "https:/cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.7.0.tar.gz"
install.packages(path, repos=NULL, type="source")
but it doesnt work too.. 但它也不起作用..
I really have no idea of what else i could do to try to install this packages.. 我真的不知道我还能做些什么来尝试安装此软件包。
sorry for my bad level in English, i made my best to create an understandable topic.. 对不起,我的英语水平很差,我竭力创建一个可以理解的话题。
Thanks for the help 谢谢您的帮助
EDIT: 编辑:
5) 5)
path<- "https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.7.0.tar.gz"
install.packages(path, repos=NULL, type="source")
i have the message 我有消息
trying URL 'https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.7.0.tar.gz'
but nothing happend and after 5 minutes I decide to close the programme 但是什么也没发生,所以5分钟后我决定关闭程序
6) 6)
install.packages("file://J:PATH/dplyr_0.7.0.tar.gz",repos = NULL, type="source")
i got the same error messager than 1. 我收到的错误信息比1多。
because i got an old R version, i tryied to install dplyr version 0.1, created in 2014, but it doesnt work as well. 因为我有一个旧的R版本,所以我尝试安装2014年创建的dplyr版本0.1,但它也无法正常运行。 i tryied to install the package manually in my personnal computer, to see if i'm doing something wrong, and solution 6 is working in my computer (solution 5 didnt) 我试图在个人计算机中手动安装软件包,以查看我是否做错了,解决方案6在我的计算机中正在工作(解决方案5没有)
From ?install.packages
: 从?install.packages
:
('http://' and 'file://' URLs are also accepted and the files will be downloaded and installed from local copies.) (也接受“ http://”和“ file://” URL,并且将从本地副本下载和安装文件。)
So your last attempt was pretty close: 所以您最后一次尝试非常接近:
path<- "https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.7.0.tar.gz"
# ^^
install.packages(path, repos=NULL, type="source")
# ^^^^
This will work if you have all dependencies already installed locally. 如果您已经在本地安装了所有依赖项,这将起作用。 Also your first attempts should have worked if you had used file://J:/...
. 如果您使用file://J:/...
那么您的第一次尝试也应该会奏效。
Another possibility for getting older packages is to use an appropriate MRAN snapshot. 获取旧软件包的另一种可能性是使用适当的MRAN快照。 For example, if I download the docker image rocker/r-ver:3.3.3
then https://mran.microsoft.com/snapshot/2017-04-21
is used as repository. 例如,如果我下载docker image rocker/r-ver:3.3.3
则将https://mran.microsoft.com/snapshot/2017-04-21
用作存储库。
okay! 好的! So i found a way 所以我找到了办法
the code to run the installation from cran website is 从cran网站运行安装的代码是
path<- "http://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.7.0.tar.gz"
install.packages(path, repos=NULL, type="source")
There is no S at http http上没有S
i still have huge problem about dependencie to install my package but i think i'll be able to solve them. 我仍然对安装我的软件包有很大的疑问,但是我认为我将能够解决它们。 Thanks for your time! 谢谢你的时间!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.