Currently, it seems that only int z and double z work.
These, for example, would work:
// [[Rcpp::export]]
NumericVector pow_fails_double_vector(double x, NumericVector z) {
return pow(x, z);
}
// This would do element-wise pow, as in R
// [[Rcpp::export]]
NumericVector pow_fails_vector_vector(NumericVector x, NumericVector z) {
return pow(x, z);
}
Is making sugar functions for more classes hard? Is there a resource to help with creating them?
Currently, it seems that only
int zanddouble zwork.These, for example, would work:
Is making sugar functions for more classes hard? Is there a resource to help with creating them?