Skip to content

Error in fintersect if the first data table contains a column called "y" #3034

@mnazarov

Description

@mnazarov
library(data.table)
dtA <- data.table(y = 1)
dtB <- data.table(y = 2)
fintersect(dtA, dtB)
#> Error in funique(y): is.data.table(x) is not TRUE

The issue is in:

x[funique(y), nomatch=0L, on=names(x), mult="first"]

I guess the solution could be to substitute funique(y) with something like
funique(get("y", envir = parent.frame(3))).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions