search for: sma_r

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

Did you mean: smar
2011 Sep 13
1
Getting Rcpp SEXP data in C++
...le example using the TTR package and the SMA function which returns a simple moving average.... Rcpp::NumericVector rv; for(int i = 0; i < 100; i++){ rv.push_back(rand()); } Rcpp::Environment TTR("package:TTR"); Rcpp::Function sma = TTR["SMA"]; SEXP sma_res = sma(rv); How do I get the values of sma_res from a SEXP type into something useful in C++, like a vector<float>? Where can I find some documentation of SEXP? I have tried googling it to no avail. cheers Worik [[alternative HTML version deleted]]