[datatable-help] Return Select/Join that does NOT match?
Short, Tom
TShort at epri.com
Wed Jul 28 13:40:37 CEST 2010
> -----Original Message-----
> From: datatable-help-bounces at lists.r-forge.r-project.org
> [mailto:datatable-help-bounces at lists.r-forge.r-project.org]
> On Behalf Of Branson Owen
> Sent: Tuesday, July 27, 2010 23:32
> To: datatable-help at lists.r-forge.r-project.org
> Subject: Re: [datatable-help] Return Select/Join that does NOT match?
...
> [2] Assume I have a DataTable with four keys. How can I
> efficiently select/join and skip the first two keys in my join?
>
> This is what I am doing now:
>
> DataTable[ CJ( unique(key1), unique(key2), "target key3", "a
> collection of target key4") ]
>
> Am I not supposed to use join like this? Could CJ(...) create
> a big object that is comparable to original datatable?
> Original datatable might already reach the limit of memory.
> Should I just use scan in this case (I hope not)?
>
You can create a secondary key manually. See this post:
http://lists.r-forge.r-project.org/pipermail/datatable-help/2010-May/000
028.html
An even simpler approach is just making a second copy of your data and
re-keying it. For large data tables, the secondary key saves memory and
is quite fast.
- Tom
More information about the datatable-help
mailing list