在归档文件中安装R软件包 [英] Install R packages in archive

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

问题描述

如何在Windows中安装归档文件中的软件包?

How can I install packages that are in archive, in Windows ?

http://cran.r-project.org/src/contrib/存档/

当我尝试安装从存档中下载的tar.gz时,出现以下错误:

When I try to install the tar.gz downloaded from the archive I get the following error:

Error in gzfile(file, "r") : cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In gzfile(file, "r") :
  cannot open compressed file 'grasp_2.5-7.tar.gz/DESCRIPTION', probable reason 'No such file or directory'

推荐答案

您可以在devtools中尝试使用功能install_version.让我们假设您要安装ggplot2的0.8版,可以将其称为install_version('ggplot2', '0.8').如果您使用的是Windows,则可以按照 从源代码构建软件包.

You can try the function install_version in devtools. Let us suppose you want to install version 0.8 of ggplot2, you can call it as install_version('ggplot2', '0.8'). If you are on Windows, you can follow the instructions here to build packages from source.

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

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