0

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)
tikiabbas
  • 119
  • 2
  • 3
  • 11
  • This is a Windows thing that pops up sometimes. Call `.libPaths()` and check the permissions for the file it returns; R needs to write packages there. – alistaire Mar 12 '16 at 07:32
  • @alistaire I checked `.libpaths()` and unset Readonly property for that directory. Still having same issue while installing **Rcpp** – tikiabbas Mar 12 '16 at 08:40
  • Restart R and then try to reinstall Rcpp again. – Thomas Mar 12 '16 at 09:38
  • @Thomas Tried after restarting console. Still the same issue with `library("wordcloud")` and `install.packages("Rcpp")` – tikiabbas Mar 12 '16 at 11:06
  • Can you provide the output of `sessionInfo()` in your question? – Thomas Mar 12 '16 at 11:32
  • @Thomas Didn't really used the `sessionInfo()` but output is too long to put in here anyway. And what's the actual use of `sessionInfo()`? – tikiabbas Mar 14 '16 at 18:30

1 Answers1

0

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

tikiabbas
  • 119
  • 2
  • 3
  • 11