[R] How to convert SEXP to double

2010-09-28 Thread Dmitrij Kudriavcev
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);

Re: [R] How to convert SEXP to double

2010-09-28 Thread Romain Francois
Le 28/09/10 08:43, Dmitrij Kudriavcev a écrit : 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-