I am struggling with a strange problem in R. I am using an old version of Rcpp to integrate R with some C ++ (unfortunately updating is not an option!), The Rcpp that I use is the old RccpTemplate. However, I doubt the problem is there.
I have some R code that works fine in most cases, but sometimes (especially when processing a lot of data) it fails mysteriously with Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character'
It always fails in list operations, for example:
res[["blabla"]] = r
But if I use options(error=recover) and try to do the same after the error, the assignment can be completed without problems. C ++ uses only numeric vectors and in fact the code from assignments that fail fails far from time.
So my vague question is: what are the most common causes of this behavior? Bad memory? Bad objects (possibly bad RcppResultSet )? I have problems with attacking this problem ...
For completeness:
platform i386-pc-solaris2.10 arch i386 os solaris2.10 system i386, solaris2.10 status major 2 minor 10.1 year 2009 month 12 day 14 svn rev 50720 language R
r rcpp
Dr g
source share