基本上我想使用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:UsersAbbasDocumentsRwin-library3.2file2388511e56acRcpp’ to ‘C:UsersAbbasDocumentsRwin-library3.2Rcpp’
The downloaded binary packages are in
C:UsersAbbasAppDataLocalTempRtmpwrnScPdownloaded_packages
当我检查路径C:UsersAbbasDocumentsRwin-library3.2file2388511e56acRcpp
时,我只能找到空文件夹。我还是把这个文件夹移到了C:UsersAbbasDocumentsRwin-library3.2Rcpp
。即使在这之后,当我尝试加载Rcpp包时,我也会收到错误。
library("Rcpp")
Error in library("Rcpp") : there is no package called ‘Rcpp’
此外,当检查路径C:UsersAbbasAppDataLocalTempRtmpwrnScPdownloaded_packages
时,我可以在那里看到zip文件Rcpp_0.12.3。
救命!
编辑:当我通过Rstudio尝试这个时,我在这里错过了什么?
> install.packages(Rcpp)
Error in install.packages : object 'Rcpp' not found
> source('~/.active-rstudio-document', echo=TRUE)
感谢您的帮助。我搞定了!手动将Rcpp zip文件提取到.libPaths()
中提到的路径