-
Notifications
You must be signed in to change notification settings - Fork 977
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
Foverlaps doesn't catch duplicate column names. Fails with hard to understand error. #1730
Comments
The error only seems to happen if x has duplicated column names, duplicates in y don't seem to cause the same problem. The following does not throw any errors.
|
Thanks for reporting. Join is performed correctly, just reordering columns in the results failed to handle duplicates. Workarounds of |
Code to reproduce:
Error is
Error in setcolorder(ans, c(xcols1, ycols, xcols2)) : neworder is length 6 but x has 7 columns.
I think the problem is that foverlap checks
whereas merge checks
Foverlaps only throws an error when by.x or by.y have duplicates, but will throw an error if any of the columns in x are duplicated (i.e. regardless of whether or not they are in by.x)
The text was updated successfully, but these errors were encountered: