[datatable-help] Return Select/Join that does NOT match?
Branson Owen
branson.owen at gmail.com
Wed Jul 28 23:29:27 CEST 2010
To divide topics into smaller pieces,
>> Finally, I can also use "by", but the FAQ says "i expression" is faster
>
> Which FAQ number please? I'm thinking "by" is the right way if you want
> all levels in A. One use of i with mult="all" is when you only want a few
> levels, like a fast sql 'having'. Is that the FAQ you mean?
I am sorry, it's not FAQ. It's in package manual page # 7, "by" section:
"Advanced: Agreggation for a subset of known groups can be achieved
more efficiently by passing those groups as an i data.table and using
mult="all". See examples."
I guess since recently by is much improved, it's not that attractive
to use i join and mult = "all"?
> Actually, thinking about it, if you want just the first row for each group, as in your example, then yes joining using i will be a lot faster than using j=B[1] with 'by'.
I agree with you, but I put a bad example. What's happening to me is
that my key is unique. What I intend to do is to select. I appreciate
the hint for using levels(A). As for integer like date timeseries, I
guess at this moment we can only use scan to select a period of time?
I saw in the manual about %between%. It sounds like that we will
implement binary search for time series later?
Sorry for bothering you this much. I didn't mean it, but we do have
questions back and forth. Again, thank you very much for your help!
Best regards,
More information about the datatable-help
mailing list