Hi,

I tried to call qchisq() (see mock code below). But while compiling it, I
got an error message saying ` error: no matching function for call to
‘qchisq(double, double, int, int)’`. I checked this file:
http://dirk.eddelbuettel.com/code/rcpp/html/Rmath_8h_source.html, and saw
this: " double 
qchisq<http://dirk.eddelbuettel.com/code/rcpp/html/namespaceR.html#a3a194e20767ad85ff10c659d9d0a6a74>
(double 
p<http://dirk.eddelbuettel.com/code/rcpp/html/external__pointer_8r.html#a745dfbf3bbf4ccff97d7b764f8694d25>,
double 
df<http://dirk.eddelbuettel.com/code/rcpp/html/namespaceR.html#aa2395daa7cd108b9b8055148806e6d56>,
int lt, int lg)" . The four arguments in the mock code also follow the
double, double, int, int form. So I wonder what the problem is with my way
of specifying the code. Thanks.


#include <R.h>
#include <stdio.h>
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]

using namespace Rcpp;
using namespace arma;

RcppExport SEXP foo(SEXP X){
NumericVector x(X);
double output = qchisq(0.5, (double)x(0), 1, 0);
 return(wrap(output));
}
_______________________________________________
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

Reply via email to