<div dir="ltr"><div><div>Thx Eduard - it's about 5% faster your way according to rbenchmark.  Hey, latency is latency....just got a need for speed...<br><br></div>Best,<br><br></div>John<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Aug 14, 2013 at 9:58 AM, Eduard Antonyan <span dir="ltr"><<a href="mailto:eduard.antonyan@gmail.com" target="_blank">eduard.antonyan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">you could use Days %in% c(1,5,10,20,30,60,90) instead, or iff Days is the first key J(c(1,5,10,20,30,60,90))</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Aug 14, 2013 at 9:30 AM, John Kerpel <span dir="ltr"><<a href="mailto:john.kerpel2@gmail.com" target="_blank">john.kerpel2@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div>Folks:<br><br></div>I've been working more and more in data.table and it gets better and better as I learn to use it....<br>

<br></div>So my question is, in the following example, is the Where statement inefficient because I'm using "==" ?  (I just want to use the subsets where days are equal to the values in the statement)<br>
<br>Should I do this another way? (Btw, I get exactly the right answer using this approach...)<br><br>db <- DB4[<br>  <br>  Days==1 | Days==5 | Days==10 | Days==20 | Days==30 | Days==60 | Days==90,<br>  <br>  j =   {list(v=m_func(x,y,z))},<br>


  <br>  by= "Date,Indicator,Days"<br>  <br>  ]<br><br></div>If more detail is necessary, lmk. Date, Indicator, and Days are keys.<br><br></div>Best,<br><br></div>John<br></div>
<br></div></div>_______________________________________________<br>
datatable-help mailing list<br>
<a href="mailto:datatable-help@lists.r-forge.r-project.org" target="_blank">datatable-help@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a><br></blockquote></div><br></div>
</blockquote></div><br></div>