I'm trying to implement named-list calling in Rcpp
in R
b<-list("bgroups"=c(1,1,1,1,0,0,0,0))
> b$bgroups
[1] 1 1 1 1 0 0 0 0
cppFunction(
"
NumericVector split(Rcpp::List & b){
Rcpp::NumericVector c= b['bgroups'];
return c;
}")
split(b)
But this causes my R session to abort.
I'm trying to implement this procedure as illustrated in one of Dirk's presentations, but I'm missing something.