Skip to content

VECTOR_ELT issues with empty data.tables with R 4.6. #7749

@rickhelmus

Description

@rickhelmus

Hello,

Since R 4.6 I am experiencing some errors in a project that heavily uses data.table. The following MWE throws an error:

> data.table::data.table()[, 1, by = numeric()]
Error in `[.data.table`(data.table::data.table(), , 1, by = numeric()) : 
  attempt access index 0/0 in VECTOR_ELT

I see this error on my MacBook with R 4.6 and the latest data.table CRAN release and from GitHub. This error is also visible on CI with Windows. For either my MacBook and CI R 4.5 doesn't throw this error.

Thanks,
Rick

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions