loadNamespace(i,c(lib.loc,.libPaths()),versionCheck = vI [[i]])出错:没有名为'Rcpp'的包

时间:2016-03-12 06:53:46

标签: r tm word-cloud rcpp11

基本上我想使用wordcloud功能。我正在通过R控制台工作。但如果这就是问题,我可以使用Rstudio。

当我使用

 wordcloud(r_stats_text_corpus)
 Error: could not find function "wordcloud"

我也试过

library("wordcloud")
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘Rcpp’
Error: package or namespace load failed for ‘wordcloud’

然后:

install.packages("Rcpp")
Installing package into ‘C:/Users/Abbas/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://pbil.univ-lyon1.fr/CRAN/bin/windows/contrib/3.2/Rcpp_0.12.3.zip'
Content type 'application/zip' length 3197148 bytes (3.0 MB)
downloaded 3.0 MB

package ‘Rcpp’ successfully unpacked and MD5 sums checked

Warning: unable to move temporary installation ‘C:\Users\Abbas\Documents\R\win-library\3.2\file2388511e56ac\Rcpp’ to ‘C:\Users\Abbas\Documents\R\win-library\3.2\Rcpp’
The downloaded binary packages are in
        C:\Users\Abbas\AppData\Local\Temp\RtmpwrnScP\downloaded_packages

当我检查路径C:\Users\Abbas\Documents\R\win-library\3.2\file2388511e56ac\Rcpp时,我只能找到空文件夹。我仍然将此文件夹移至C:\Users\Abbas\Documents\R\win-library\3.2\Rcpp。即使在此之后,当我尝试加载Rcpp包时,我也会收到错误。

library("Rcpp")
Error in library("Rcpp") : there is no package called ‘Rcpp’

同样在检查路径C:\Users\Abbas\AppData\Local\Temp\RtmpwrnScP\downloaded_packages时,我可以在那里看到zip文件Rcpp_0.12.3。

帮助!

编辑:当我通过Rstudio尝试这个时,我在这里缺少什么?

> install.packages(Rcpp)
Error in install.packages : object 'Rcpp' not found
> source('~/.active-rstudio-document', echo=TRUE)

1 个答案:

答案 0 :(得分:0)

感谢您的帮助。我得到了修复! 手动将Rcpp zip文件解压缩到.libPaths()

中提到的路径