Dear Matthew<div><br></div><div>Thank you for trying to guide me. Unfortunately I was not able to really comprehend what I was reading</div><div><br></div><div>I entered the following into google search "site:<a href="http://lists.r-forge.r-project.org/pipermail/datatable-help/">lists.r-forge.r-project.org/pipermail/datatable-help/</a> secondary"</div>
<div><br></div><div>I got many hits and I could see a discussion but could not fathom how it related to my question.</div><div> </div><div><br></div><div>Would love some help from you or someone else. I want to be able to select by a criterion in the second key and accept all possible values in the first key.</div>
<div>Farrel Buchinsky<br>Google Voice Tel: (412) 567-7870<br><br>
<br><br><div class="gmail_quote">On Wed, Jan 18, 2012 at 22:40, Matthew Dowle <span dir="ltr"><<a href="mailto:mdowle@mdowle.plus.com">mdowle@mdowle.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi. Try searching datatable-help for 'secondary'.<br>
<div><div class="h5"><br>
> In setkey it is possible to have multiple columns be a key. There is<br>
> however an order to it. To select all the rows by a particular value in<br>
> the<br>
> first key is easy<br>
> DT[J("a value from the first key")]<br>
><br>
> It is even quite easy to select by an AND criteria that incorporates the<br>
> second key<br>
> DT[J("a value from the first key","a value from the second key")]<br>
><br>
> But what happens if one wanted to select by only one criteria being a a<br>
> value that must be present in the second key? I was hoping to get lucky by<br>
> just leaving it blank. But it did not see to work.<br>
><br>
> DT[J(,"a value from the second key")]<br>
><br>
> I would love to know what you do.<br>
><br>
><br>
> Farrel<br>
</div></div>> _______________________________________________<br>
> datatable-help mailing list<br>
> <a href="mailto:datatable-help@lists.r-forge.r-project.org">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>
<br>
<br>
<br>
<br>
</blockquote></div><br></div>