I do not know if that is how all indexes work. I am not really a card-carrying database manager or programmer. I just play one in my spare time. The price I pay is not remembering how to write syntax when I need to do something. That to me, is a higher price than slow subsetting. If the syntax is not easy I would rather just use the traditional vector scan methods that one sees in conventional data.frame subset commands. <div>
<br></div><div>Notwithstanding my idiosyncratic needs, I thank you very much for your explanation.<br clear="all">Farrel <div><br><br>
<br><br><div class="gmail_quote">On Thu, Jan 19, 2012 at 18:26, Steve Lianoglou <span dir="ltr"><<a href="mailto:mailinglist.honeypot@gmail.com">mailinglist.honeypot@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 class="im">On Thu, Jan 19, 2012 at 6:09 PM, Farrel Buchinsky <<a href="mailto:fjbuch@gmail.com">fjbuch@gmail.com</a>> wrote:<br>
> Oy gevalt!.Am I correct to believe that the technique is rearranging the<br>
> data.table so that J can accept the input as pertaining to a secondary key?<br>
> That seems as if it is too much work for me and my computer. I will rather<br>
> stick to the vector scan methods for now.<br>
<br>
</div>Not the entire data.table, just the key columns.<br>
<br>
Depending on how many queries you're going to make against the 2nd key<br>
only, the pay off for your troubles could be anywhere from zero to<br>
mucho. Of course if you simply don't have the RAM to make the idx<br>
data.table in the first place, then that's that.<br>
<br>
That's how all indexes work though, no? In a database for instance, if<br>
you have a compound key/index over two or more columns, the index will<br>
only help queries that work any prefix (or whole) part of the key, and<br>
not just any subset elements of it (as you want to do here), right?<br>
<br>
HTH,<br>
-steve<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Steve Lianoglou<br>
Graduate Student: Computational Systems Biology<br>
| Memorial Sloan-Kettering Cancer Center<br>
| Weill Medical College of Cornell University<br>
Contact Info: <a href="http://cbio.mskcc.org/~lianos/contact" target="_blank">http://cbio.mskcc.org/~lianos/contact</a><br>
</div></div></blockquote></div><br></div></div>