简体   繁体   English

在R中安装软件包时出错

[英]Error in installing packages in R

I tried installing rtweet() in R but it shows the following error: 我尝试在R中安装rtweet() ,但显示以下错误:

Error: package or namespace load failed for 'rtweet' in loadNamespace(j <- imp[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called 'Rcpp' 错误:在loadNamespace(j <-imp [[1L]],c(lib.loc,.libPaths()),versionCheck = vI [[j]])中'rtweet'的程序包或名称空间加载失败称为“ Rcpp”

As Russ said, you should try to install Rcpp before: 正如Russ所说,您应该尝试在Rcpp之前安装Rcpp

install.packages("Rcpp")

Or you could use the line: 或者您可以使用以下行:

install.packages("rtweet", dependencies = TRUE)

It will install rtweet and all dependencies like Rcpp 它将安装rtweet和所有依赖项,例如Rcpp

You could also, try to install it directly from URL: 您也可以尝试直接从URL安装:

install.packages("https://cran.r-project.org/web/packages/rtweet/index.html")

And if still fails, go directly to issues from rtweet ( https://github.com/mkearney/rtweet/issues ) ;-) 如果仍然失败,请直接从rtweet( https://github.com/mkearney/rtweet/issues );-)处理问题

And also be careful, because R packages are case-sensitive! 还要小心,因为R包区分大小写!

Have a nice day! 祝你今天愉快!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM