Question

New to R and have the following question. I got the error below when I was trying to create wordcloud in R. Could anyone tell me what the error means and is there a workaround?

Error in .overlap(x1, y1, sw1, sh1, boxes) : function 'dataptr' not provided by package 'Rcpp'

No correct solution

OTHER TIPS

That is an error we are getting with the newest Rcpp (which uses a different initialization scheme and no user-facing library). Make sure you have

  1. the current version of Rcpp

  2. and a current / rebuilt version of wordcloud.

On my system, with a fresh install of wordcloud, it all works fine:

R> library(wordcloud)
Loading required package: Rcpp
Loading required package: RColorBrewer
R> example(wordcloud)

wrdcldR> wordcloud(c(letters, LETTERS, 0:9), seq(1, 1000, len = 62))

wrdcldR> if(require(tm)){
wrdcld+ 
wrdcld+         #####                   from character          #####
wrdcld+         wordcloud(
wrdcld+ "Many years ago the great British explorer George Mallory, who 
wrdcld+ was to die on Mount Everest, was asked why did he want to climb 
wrdcld+ it. He said, \"Because it is there.\"
[.... more omitted ...]

After a while, I got it.

1) As stated, reinstall the latest version of Rcpp is the solution.

2) On top of that, if you use a library other than wordcloud that do not load automatically RCPP, do not forget to include

library(Rcpp)

or

require(Rcpp)

on your code before

dyn.load("your_shared_lib.so")

Source: building_shared_libs_with_Rcpp

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top