This is not a Rcpp solution but be advise that as long as your function "ma" do not require values on previous lines, you might want to look at the data.table package. This package provides ultra fast operations on data.frames. Off course nothing prevents you from writing "ma" in C/C++ and to use data.table to apply the function quickly and to insert the new data into the data.table by reference
_______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
