In setkey it is possible to have multiple columns be a key. There is however an order to it. To select all the rows by a particular value in the first key is easy<div>DT[J("a value from the first key")]</div><div>
<br></div><div>It is even quite easy to select by an AND criteria that incorporates the second key</div><div>DT[J("a value from the first key","a value from the second key")] </div><div><br></div><div>
But what happens if one wanted to select by only one criteria being a a value that must be present in the second key? I was hoping to get lucky by just leaving it blank. But it did not see to work.</div><div><br></div><div>
DT[J(,"a value from the second key")] </div><div><br></div><div>I would love to know what you do.</div><div><br></div><div><br clear="all">Farrel <br>
</div>