Skip to content
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

Don't warn about picking a value.var if fun.aggregate is explicitly length #2980

Closed
MichaelChirico opened this issue Jul 18, 2018 · 0 comments
Closed
Milestone

Comments

@MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Jul 18, 2018

If I'm not mistaken, it doesn't matter what value.var is when fun.aggregate is length. Hence, I often forget to set it explicitly in such cases and the warning message comes across as unnecessary noise:

DT = data.table(a = sample(10, 1000, TRUE), b = rep(1:5, 200))
dcast(DT, a ~ b, fun.aggregate = length)

Using 'b' as value column. Use 'value.var' to override

     a  1  2  3  4  5
 1:  1 29 14 30 19 23
 2:  2 15 22 15 16 11
 3:  3 17 14 17 20 18
 4:  4 17 18 26 16 31
 5:  5 13 19 26 16 18
 6:  6 21 22 15 16 25
 7:  7 29 24 27 27 20
 8:  8 12 20  9 25 16
 9:  9 23 30 17 20 16
10: 10 24 17 18 25 22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.