search for: fit_ar11

Displaying 1 result from an estimated 1 matches for "fit_ar11".

Did you mean: fit1ar1
2010 Sep 28
1
How to convert SEXP to double
Hello All, A simple question. I get some return from the R in my C++ program (via Rcpp package). The result come, as SEXP and it should be a simple numeric variable. How to convert it to double? The code, what i use: stringstream ss; ss << "p <- predict(fit_ar11, n.ahead = 2, doplot=FALSE);" << "p$pred[1]"; SEXP ans; int iRet = R.parseEval(ss.str().c_str()); if (iRet == 0 && ans != NULL) { // ??? } Cheers, Dima [[alternative HTML version deleted]]