[Rcpp-devel] Rcpp: Error: not compatible with requested type
Dirk Eddelbuettel
edd at debian.org
Fri Oct 3 18:49:50 CEST 2014
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 | edd at debian.org
More information about the Rcpp-devel
mailing list