Skip to content

filter from dplyr plus nested setDT renders index invalid #7460

@jan-swissre

Description

@jan-swissre

If we remove setDT from f there will be no error anymore

dt = data.table(a = c("b","a","c"), v = 1:3)
dt[a == "a"] ## creates index
f = function(x) {
  setDT(x)
  x[a == "b"]
}
f(
  dplyr::filter(dt, a != "a")
)
#Error: Internal error in getindex: index 'a' exists but is invalid. Please report to the data.table issues tracker.

1.17.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions