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

Problem with outer join if tolerance is large #66

Closed
jorainer opened this issue Aug 21, 2020 · 0 comments · Fixed by #69
Closed

Problem with outer join if tolerance is large #66

jorainer opened this issue Aug 21, 2020 · 0 comments · Fixed by #69
Labels
bug Something isn't working

Comments

@jorainer
Copy link
Member

I stumbled across the following problem:
performing an outer join on the two vectors below with a tolerance of 3 I would expect to have one match more than what we get:

x <- c(1, 1.5, 2, 2.1, 5, 6, 7)
y <- c(4.6, 4.7, 4.8, 4.9, 5, 6, 7, 8)

MsCoreUtils:::.joinOuter(x, y, 3, 0)
$x
 [1]  1  2  3  4 NA NA NA NA  5  6  7 NA

$y
 [1] NA NA NA NA  1  2  3  4  5  6  7  8

In fact, I would expect to see a match also between x[4] and y[1] (i.e. 2.1 and 4.6).
While this is a special case and in real-life spectra comparisons we might not have this case I would still want to fix that. I am currently checking if I could get it fixed in the C implementation of the outer join.

@jorainer jorainer added the bug Something isn't working label Aug 21, 2020
jorainer added a commit that referenced this issue Aug 21, 2020
- Fix `.cjoinOuter` to avoid issue #66.
- Still need some search for other special cases.
@sgibb sgibb linked a pull request Sep 23, 2020 that will close this issue
@sgibb sgibb closed this as completed in #69 Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant