Skip to content

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

Description

@sindribaldur
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.

Activity

  1. 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[/+] on Mar 20, 2020
  2. added this to the 1.14.1 milestone on Jun 14, 2021
  3. modified the milestones: 1.14.9, 1.15.0 on Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    non-atomic columne.g. list columns, S4 vector columns

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions