Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘Rcpp’ [duplicate]

三世轮回 提交于 2019-12-12 03:02:21

问题


Basically I want to use wordcloud function. I'm working through R console. But I could use Rstudio if thats the problem.

When I use

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

I also tried

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’

Then:

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

When I check the path C:\Users\Abbas\Documents\R\win-library\3.2\file2388511e56ac\Rcpp I could only find empty folder. Still I moved this folder to C:\Users\Abbas\Documents\R\win-library\3.2\Rcpp. Even after this when i try to load Rcpp package I get the error.

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

Also when checking the path C:\Users\Abbas\AppData\Local\Temp\RtmpwrnScP\downloaded_packages, I can see zip file Rcpp_0.12.3 there.

Help!

EDIT: When I'm trying this through Rstudio, What am I missing on here?

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

回答1:


Thanks for the help. I got the fix! Manually extracted the Rcpp zip file to path mentioned in .libPaths()



来源:https://stackoverflow.com/questions/35954706/error-in-loadnamespacei-clib-loc-libpaths-versioncheck-vii-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!