Skip to content

mult="none" option in [.data.table #1233

@MichaelChirico

Description

@MichaelChirico

Sometimes, when there are multiple matches in a merge, I prefer to just drop those matches entirely as a curb against mismatching (e.g., there are multiple matches when I expected there to be only 1).

As a workaround, I find myself doing something like dt_1[dt_2[,if (.N==1) .SD,by=key],...], but this can be slow if there are many keys and dt_2 is large; better, it seems, would be to just discard the .N>1 cases via mult in [.data.table.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions