Skip to content

strange error with non-empty empty j #2142

@MichaelChirico

Description

@MichaelChirico

This is pretty minor, but worth noting/documenting/fixing if it's easy. I came across it when commenting out parts of my code to test the output of a join absent performing the j operation:

library(data.table)
DT = data.table(a = 1:5)
DT[ , {}]

Error in jsub[[2L]] : subscript out of bounds

Closest operation in base R I guess is:

with(DT, {})
# NULL

I guess I would expect this to just return DT since that's what DT[ , ] does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions