Oh, and I missed one call to a subordinate function. So add // [[Rcpp::export]] SEXP newCompQuant2(int n, int M, Rcpp::Function f) { SEXP res = compquantRcpp2(n, M, f); return res; }
and at the bottom call it: res <- newCompQuant2(n=50, M=10^3, f=rnorm) print(str(res)) and then the result is R> res <- newCompQuant2(n=50, M=10^3, f=rnorm) R> print(str(res)) List of 1 $ law.pars: chr "" NULL R> just like you were told as well on StackOverflow. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel