-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created CJ.dt - for cross joining two data.tables #814
Conversation
Done as separate code on the assumption that it can later be deprecated when better code is integrated into CJ to handle two data.tables
The sorting of your function does not match that of CJ itself. On Tue, Sep 16, 2014 at 2:50 PM, stephlocke notifications@github.com
|
Here's a suggestion for how to do it using CJ, that can take an arbitrary CJ.dt = function(...) { (the subset part above can almost certainly be optimized) On Tue, Sep 16, 2014 at 3:09 PM, Eduard Antonyan eduard.antonyan@gmail.com
|
You're right it doesn't, it does not do any sorting and leaves data in the order of that the data.tables are already in. Totally appreciate that the behaviour of CJ is to apply |
Just saw your suggestion - yes, making a more generic function is a much better idea 👍 |
R documentation speaks about CJ.dt But when I try o use it I get the error
|
@skanskan I guess this is filed on the wrong issue tracker? https://github.com/lockedata/optiRum/issues I see |
Yes - I implemented this in optiRum initially and look forward to it being deprecated one day :) |
Anyway I'm getting the result I want with |
Hmm I guess this is #1717 |
Done as separate code on the assumption that it can later be deprecated when better code is integrated into CJ to handle two data.tables
Was initially going to be a helper function in optiRum but getting it into data.table is much more preferable. I've not included any unit tests as the difference is significant but please see these testthat unit tests for it I've written for the function