安装旧软件包R [英] install old package R

查看:94
本文介绍了安装旧软件包R的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Rstudio 0.98.507.0和R 3.1.1.我正在使用虚拟机,无法在计算机中安装任何东西(专业计算机,并且需要很长时间才能获得新安装的授权)

i'm working in Rstudio version 0.98.507.0 and 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)

我要安装" plotly "软件包,但此软件包需要" dplyr "才能正常工作;当前版本的" dplyr "仅适用于R版本3.1.2

i'm looking to install package "plotly" but this package require "dplyr" to work; The current version of "dplyr" is only working with R version 3.1.2

我也正在尝试安装旧版本的"dplyr,但没有任何效果.我从cran下载了文件.我将文件放在目录中,这是我尝试过的代码和收到的错误消息:

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:

1)

install.packages("J:/ PATH TO THE FILE/dplyr_0.7.0.tar.gz",repos = NULL, type="source") 

错误是:

   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)然后我尝试设置工作目录,然后运行

2) Then i tried to set the working directory, and i run

install.packages("dplyr_0.7.0.tar.gz",repos = NULL, type="source")

错误消息是

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")

错误消息是:

Error in as.POSIXct.default(value) : 
  do not know how to convert 'value' to class "POSIXct"

4)我尝试的最后一个解决方案是:

4) the last solution i tried is:

 path<- "https:/cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.7.0.tar.gz"
install.packages(path, repos=NULL, type="source")

但是它也不起作用.

我真的不知道我还可以做些什么来尝试安装此软件包.

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..

感谢您的帮助

5)

path<- "https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.7.0.tar.gz"
install.packages(path, repos=NULL, type="source")

我收到消息

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

6)

install.packages("file://J:PATH/dplyr_0.7.0.tar.gz",repos = NULL, type="source")

我得到的错误信息与1相同.

i got the same error messager than 1.

因为我有一个旧的R版本,所以我尝试安装2014年创建的dplyr版本0.1,但它也无法正常运行.我试图在个人计算机上手动安装该软件包,以查看我是否做错了什么,并且解决方案6在我的计算机上正在工作(解决方案5没有)

because i got an old R version, i tryied to install dplyr version 0.1, created in 2014, but it doesnt work as well. 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)

推荐答案

来自?install.packages :

("http://"和"file://" URL也被接受,并且文件将从本地副本下载并安装.)

(‘http://’ and ‘file://’ URLs are also accepted and the files will be downloaded and installed from local copies.)

所以您最后一次尝试非常接近:

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")
#                ^^^^

如果您已经在本地安装了所有依赖项,这将起作用.另外,如果您使用过 file://J:/... .

This will work if you have all dependencies already installed locally. Also your first attempts should have worked if you had used file://J:/....

获取旧软件包的另一种可能性是使用适当的MRAN快照.例如,如果我下载docker镜像 rocker/r-ver:3.3.3 ,则 https://mran.microsoft.com/snapshot/2017-04-21 用作存储库.

Another possibility for getting older packages is to use an appropriate MRAN snapshot. 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.

这篇关于安装旧软件包R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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