R:install.packages 中的错误:无法打开连接 [英] R: Error in install.packages : cannot open the connection

查看:514
本文介绍了R:install.packages 中的错误:无法打开连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装 RINDSEL 包,但无法安装,并且不断收到以下错误:

<块引用>

install.packages 错误:无法打开连接

我从以下位置下载了软件包:

rindsel_1.0_2.zip |综合育种平台

并从目录中加载它.可以安装目录中的其他软件包,但不能安装这个.

包是否损坏或是否有其他错误?

我真的很感激任何帮助.提前致谢

解决方案

将 zip 文件 RinSel Software 重命名为 Rindsel.这是描述文件中指定的名称.

然后,您可以使用命令

R 中安装包

install.packages("C:/path/to/Rindsel.zip",repos=NULL,type="win.binary")

这很好用……起初(!!!).

Rindsel 包的问题是.它已经很旧了.它是用 R 2.13.1 构建的.因此,如果您想加载库,这将是在 R 中使用包的下一步,您将收到错误:

构建包的问题(错误:包已经在 R-3.0.0 之前构建")

我的建议:联系软件包的作者,询问他们是否可以提供您可以自己构建软件包的源文件,或者他们是否可以将 Rindsel 软件包与更新的 R 捆绑在一起版本.

(或者您可以尝试寻找 旧 R 版本 看看你是否可以用旧的 R 来运行这个东西......但是,我不会认真建议这样做.它可能会导致与其他所需软件包的依赖冲突......)

EDIT 15-02-2018:OP 询问是否可以使用可能是 Rindsel 源文件的源构建 R 包.

是的,基本上,你可以这样做.您必须制作自己的描述和命名空间文件,并将源文件放在 R 文件夹中,而不是在 R 中调用命令来构建它....

但对于链接 OP 已发布.

OP,只需运行 R 中的脚本即可!这很容易.

  1. 下载 zip-file 并将其解压缩到您的机器上.
  2. 转到那个目录.R 命令将是

<块引用>

setwd('path/to/your/directory')

  1. 然后运行 ​​R 脚本,例如 KNIndex.r.很简单:

<块引用>

source('KNIndex.r')

然后脚本将运行并产生一些输出/提示.

I was trying to install the package RINDSEL but I am unable to install it and I keep getting the following error:

Error in install.packages : cannot open the connection

I downloaded the package from:

rindsel_1.0_2.zip | Integrated Breeding Platform

and loaded it from the directory. Other packages from the directory can be installed but just not this one.

Is the package corrupt or could there be any other error?

I would really be grateful for any help. Thanks in advance

解决方案

Rename the zip file RinSel Software into Rindsel. That's the name specified in the discription file.

Then, you can install the package in R with the command

install.packages("C:/path/to/Rindsel.zip",repos=NULL,type="win.binary")

That works fine... at first (!!!).

Problem with the Rindsel package is. It is quite old. It was build with R 2.13.1. Therefore, if you want to load the library which would be the next step to use the package in R you will get the error:

Problems building package (Error: "package has been build before R-3.0.0")

My suggestion: Contact the authors of the package and ask them if they can either provide the source file that you can build the package by yourself or if they can bundle the Rindsel package with a newer R version.

(Or you could try to hunt down an old R version and see if you can get the thing running with an old R... However, I would not seriously suggest to do that. It would probably result in conflicting dependencies with the other required packages...)

EDIT 15-02-2018: OP asked if one can build an R package with sources that are presumeably the Rindsel source files.

Yes, basically, you could do that. You would have to make a your own description and namespace file and put the source file in the R folder than invoke the command in R to build it....

But it's not neccessary with the script files provided by the link the OP posted.

OP, just run the scripts in R! It's quite easy.

  1. Download the zip-file and extract it on your machine.
  2. Go to that directory. The R command would be

setwd('path/to/your/directory')

  1. Than run the R script, e.g, the KNIndex.r. It's simple:

source('KNIndex.r')

Then the script will run and produce some output / prompts.

这篇关于R:install.packages 中的错误:无法打开连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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