Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MichaelChirico opened this issue Jul 18, 2015 · 2 comments
Closed

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

MichaelChirico opened this issue Jul 18, 2015 · 2 comments

Comments

@MichaelChirico
Copy link
Member

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.

@MichaelChirico
Copy link
Member Author

@jangorecki yes, very much in the same vein as that thread--basically generalizing the possible returns for mult. Would also be fine to see something like mult=5.

@arunsrinivasan
Copy link
Member

Closed as duplicated of new issue #1260.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants