[Rcpp-devel] Rcpp-modules trouble on windows
Dmitriy Selivanov
selivanov.dmitriy at gmail.com
Thu Oct 22 10:01:12 CEST 2015
Hi, mailing list!
I have issue with Rcpp modules on *windows only* (don't have any problems
on linux and osx ). Don't really sure, whether it rcpp-modules related.
Problem is following - when I try to get class to global environment - R
crashes (actually freezes - cpu core load 100% and nothing happens).
I'm developing package for text analysis and vectorization - text2vec
<https://github.com/dselivanov/text2vec>. Here, for example, I have two
classes
<https://github.com/dselivanov/text2vec/blob/master/src/Corpus.cpp#L343-L366>,
which I expose using Rcc-modules. Very similar to RcppAnnoy (I used it as
example for rcpp-modules).
Now consider following example
<https://gist.github.com/dselivanov/ffb535ab1447956bb10f>:
```R
library(devtools)
library(magrittr)
install_github("dselivanov/text2vec")
data("movie_review")
# this works fine:
dtm <- create_dict_corpus(src = movie_review[['review']][1:100],
preprocess_fun = tolower,
tokenizer = regexp_tokenizer,
batch_size = 100,
progress = F) %>%
get_dtm(corpus = corp, type = "dgCMatrix")
dim(dtm)
#but this crashes:
corp <- create_dict_corpus(src = movie_review[['review']][1:100],
preprocess_fun = tolower,
tokenizer = regexp_tokenizer,
batch_size = 100,
progress = F)
str(corp)
```
Any thoughts?
--
Regards
Dmitriy Selivanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20151022/ee7687ab/attachment.html>
More information about the Rcpp-devel
mailing list