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

fintersect() does not preserve order #4716

Closed
mllg opened this issue Sep 25, 2020 · 0 comments · Fixed by #4725
Closed

fintersect() does not preserve order #4716

mllg opened this issue Sep 25, 2020 · 0 comments · Fixed by #4725
Milestone

Comments

@mllg
Copy link
Contributor

mllg commented Sep 25, 2020

x1 = c("b", "c", "a")
x2 = c("a", "c")

intersect(x1, x2)
fintersect(data.table(x = x1), data.table(x = x2))$x

The result is ordered according to the 2nd argument while R's intersect() preserves the order of the first argument.

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

Successfully merging a pull request may close this issue.

3 participants