install.packages中的错误:类型==“两个"不能与'repos = NULL'一起使用 [英] Error in install.packages : type =="both" cannot be used with 'repos =NULL'

查看:1412
本文介绍了install.packages中的错误:类型==“两个"不能与'repos = NULL'一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我正在尝试离线安装软件包.我有R工作室.我的工作基于以下先前提出的问题:

Actually I am trying to install packages offline. I have R studio. what I do is based on previously asked question as follows:

install.packages(C:/Users/Desktop/class_7.3-12.zip", repos = NULL)

我得到标题中提到的错误.有人在外面给我提建议吗?

I get the error I mentioned in the title. is someone out there to give me an advice ?

谢谢

推荐答案

您可以从源代码或二进制文件中安装软件包.在文档的打包档案"部分中,您可以阅读:

You can install packages from source or binaries. In the "Package Archives" section of the documentation you may read:

包源class_7.3-12.tar.gz

Package Source class_7.3-12.tar.gz

Windows Binary class_7.3-12.zip

Windows Binary class_7.3-12.zip

(32位和64位)Mac OS X 10.9(Mavericks)class_7.3-12.tgz

(32- & 64-bit) Mac OS X 10.9 (Mavericks) class_7.3-12.tgz

从二进制文件安装时(似乎是您的情况):

When installing from binary (as it seems to be your case):

install.packages("class_7.3-12.zip", repos = NULL, type="binary")

否则,从源代码安装时:

Otherwise, when installing from source:

install.packages("class_7.3-12.tar.gz", repos = NULL, type="source")

这篇关于install.packages中的错误:类型==“两个"不能与'repos = NULL'一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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