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 | [email protected]
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel