<div dir="ltr"><div>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</div><div> missed that one somehow ( getting old possibly).  Thanks a lot.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Dec 9, 2018 at 4:03 AM Barth Riley <<a href="mailto:barthriley@comcast.net">barthriley@comcast.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_4662161889549469600WordSection1"><p class="MsoNormal">Dear Mark</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">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:</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><a href="http://gallery.rcpp.org/articles/vector-cumulative-sum/" target="_blank">http://gallery.rcpp.org/articles/vector-cumulative-sum/</a></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Barth</p></div></div></blockquote></div>