[Rcpp-devel] trying to insert a number as first element of alreadyexisting vector
Hi Barth. That example is perfecto. I went through the list of gallery questions with my eye when looking for a cumsum so I must have missed that one somehow ( getting old possibly). Thanks a lot.
On Sun, Dec 9, 2018 at 4:03 AM Barth Riley <barthriley at comcast.net> wrote:
Dear Mark Regarding your second question, the STL has a function called partial_sum() which can be used to compute the cumulative sum. Go to the following URL for details: http://gallery.rcpp.org/articles/vector-cumulative-sum/ Barth
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20181209/caeb54cd/attachment.html>