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

Confusing error message when trying to group by a list column #4308

Closed
sindribaldur opened this issue Mar 19, 2020 · 0 comments · Fixed by #4309
Closed

Confusing error message when trying to group by a list column #4308

sindribaldur opened this issue Mar 19, 2020 · 0 comments · Fixed by #4309

Comments

@sindribaldur
Copy link

sindribaldur commented Mar 19, 2020

iis <- data.table(iris)
iis[, letts := .(list(sample(letters[1:4], size = 2))), 1:nrow(iris)]
iis[, .N, .(Species, letts)]

Error in `[.data.table`(iis, , .N, .(Species, letts)) : 
  column or expression 2 of 'by' or 'keyby' is type list. Do not quote column names. Usage: DT[,sum(colC),by=list(colA,month(colB))]

"Do not quote column names" seems out of place.

@sindribaldur sindribaldur changed the title Cofnusing error message when trying to group by a list column Confusing error message when trying to group by a list column Mar 20, 2020
@mattdowle mattdowle added this to the 1.14.1 milestone Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants