Re: [Rcpp-devel] trying to insert a number as first element of already existing vector

2018-12-11 Thread Mark Leeds
t;> uqmax neval > >>c(testelem, testvec) 36.48577 36.93754 41.10550 43.76742 > >> 44.20709 46.09741 100 > >>mybar(testvec, testelem) 102.54042 103.21756 106.88749 104.32033 > >> 110.31527 119.55512 100 > >> mybar2(testvec, testele

Re: [Rcpp-devel] trying to insert a number as first element of already existing vector

2018-12-11 Thread Mark Leeds
100 mybar2(testvec, testelem) 28.520 31.7695 45.36286 33.8250 37.7335 813.504 100 mybar3(testvec, testelem) 9.449 25.0345 33.21592 26.2625 27.4070 635.800 100 On Mon, Dec 10, 2018 at 6:10 AM Serguei Sokol wrote: > Le 09/12/2018 à 09:35, Mark Leeds a écrit : > > Hi All: I wrote

Re: [Rcpp-devel] trying to insert a number as first element of already existing vector

2018-12-10 Thread Mark Leeds
gt; > > https://stackoverflow.com/questions/41602024/should-i-prefer-rcppnumericvector-over-stdvector > > On December 10, 2018 8:01:40 AM PST, Serguei Sokol < > serguei.so...@gmail.com> wrote: > >Le 10/12/2018 à 16:48, Mark Leeds a écrit : > >... > >> Oh, as

Re: [Rcpp-devel] trying to insert a number as first element of already existing vector

2018-12-10 Thread Mark Leeds
, Dec 10, 2018 at 11:01 AM Serguei Sokol wrote: > Le 10/12/2018 à 16:48, Mark Leeds a écrit : > ... > > Oh, as I said, the documentation on Rcpp is incredible but is there > > anything discussing memory because > > I'm pretty lost on that. Thanks again. > Are you

Re: [Rcpp-devel] trying to insert a number as first element of already existing vector

2018-12-10 Thread Mark Leeds
l > >>c(testelem, testvec) 36.48577 36.93754 41.10550 43.76742 > >> 44.20709 46.09741 100 > >>mybar(testvec, testelem) 102.54042 103.21756 106.88749 104.32033 > >> 110.31527 119.55512 100 > >> mybar2(testvec, testelem) 95.64696 96.19447 10

Re: [Rcpp-devel] trying to insert a number as first element of alreadyexisting vector

2018-12-09 Thread Mark Leeds
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 wrote: > Dear Mark > > > > Regarding your second que

Re: [Rcpp-devel] trying to insert a number as first element of alreadyexisting vector

2018-12-09 Thread Mark Leeds
Thanks Barh. I'll check that out. On Sun, Dec 9, 2018 at 4:03 AM Barth Riley 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.rc

[Rcpp-devel] trying to insert a number as first element of already existing vector

2018-12-09 Thread Mark Leeds
Hi All: I wrote below and it works but I have a strong feeling there's a better way to do it. I looked on the net and found some material from back in ~2014 about concatenating vectors but I didn't see anything final about it. Thanks for any insights. Also, the documentation for Rcpp is beyond inc

Re: [Rcpp-devel] regular expression in Rcpp

2015-01-13 Thread Mark Leeds
Thanks Matt and Dirk. Both suggestions are good. I'll try one of them ( not sure which yet ) and let you know how it works out. Definitely it's not as as easy a problem as I originally thought. Thanks again. Mark On Tue, Jan 13, 2015 at 9:41 AM, Matt D. wrote: > On 1/13/2015 07:2

[Rcpp-devel] regular expression in Rcpp

2015-01-12 Thread Mark Leeds
Hi All: I was trying to do something with regular expressions in Rcpp so I piggy backed heavily off of Dirk's boost.regex example in the Rcpp Gallery where he takes streams of digits and checks them for machine and human readability. My problem is actually pretty different and simpler. Essentially