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

further manipulating x's columns during non-equi join returns NA (nomenclature issue?) #2569

Open
l-jaye opened this issue Jan 16, 2018 · 3 comments · May be fixed by #3093
Open

further manipulating x's columns during non-equi join returns NA (nomenclature issue?) #2569

l-jaye opened this issue Jan 16, 2018 · 3 comments · May be fixed by #3093
Labels
bug non-equi joins rolling, overlapping, non-equi joins
Milestone

Comments

@l-jaye
Copy link

l-jaye commented Jan 16, 2018

Hello! Please see this stack overflow post, where the issue is described. Thanks again for the help!

@arunsrinivasan
Copy link
Member

@l-jaye, thank you. Will take a look.

@MarkusBonsch
Copy link
Contributor

This is very much related to the unexpected column structure of data.table joins. frame is not x.frame, but i.frame.stop in this case. See also #2602

set.seed(5)
dat = data.table ( time.group = c (rep ("base", 42), rep ("4h", 42)), 
                   well = c (rep ("A1", 20), rep ("B1", 22), rep ("A1", 19), rep ("B1", 23)),
                   frame = c(1:20, 1:22, 1:19, 1:23),
                   signal = runif (84, 0, 1) )

pts = data.table (time.group = c (rep ("base", 2), rep ("4h", 2)),
                  well = rep (c ("A1", "B1"), 2),
                  frame.start = c (3, 4, 3, 6),
                  frame.stop = c (17, 18, 12, 19) )

dat[pts, on = .(time.group, well, frame >= frame.start, frame <= frame.stop),
    .(x.frame, i.frame.start, i.frame.stop),
    by = .EACHI]

# frame x.frame i.frame.start i.frame.stop
# 1:     3       3             3           17
# 2:     3       4             3           17
# 3:     3       5             3           17
# 4:     3       6             3           17
# 5:     3       7             3           17
# 6:     3       8             3           17
# 7:     3       9             3           17
# 8:     3      10             3           17
# 9:     3      11             3           17
# 10:     3      12             3           17
# 11:     3      13             3           17
# 12:     3      14             3           17
# 13:     3      15             3           17
# 14:     3      16             3           17
# 15:     3      17             3           17
# 16:     4       4             4           18
# 17:     4       5             4           18
# 18:     4       6             4           18
# 19:     4       7             4           18
# 20:     4       8             4           18
# 21:     4       9             4           18
# 22:     4      10             4           18
# 23:     4      11             4           18
# 24:     4      12             4           18
# 25:     4      13             4           18
# 26:     4      14             4           18
# 27:     4      15             4           18
# 28:     4      16             4           18
# 29:     4      17             4           18
# 30:     4      18             4           18
# 31:     3       3             3           12
# 32:     3       4             3           12
# 33:     3       5             3           12
# 34:     3       6             3           12
# 35:     3       7             3           12
# 36:     3       8             3           12
# 37:     3       9             3           12
# 38:     3      10             3           12
# 39:     3      11             3           12
# 40:     3      12             3           12
# 41:     6       6             6           19
# 42:     6       7             6           19
# 43:     6       8             6           19
# 44:     6       9             6           19
# 45:     6      10             6           19
# 46:     6      11             6           19
# 47:     6      12             6           19
# 48:     6      13             6           19
# 49:     6      14             6           19
# 50:     6      15             6           19
# 51:     6      16             6           19
# 52:     6      17             6           19
# 53:     6      18             6           19
# 54:     6      19             6           19
# frame x.frame i.frame.start i.frame.stop

@ethanbsmith
Copy link
Contributor

probably related if not a duplicate of #1700

@mattdowle mattdowle added this to the v1.10.6 milestone Apr 10, 2018
@mattdowle mattdowle modified the milestones: v1.11.0, v1.11.2 Apr 29, 2018
@mattdowle mattdowle linked a pull request Oct 3, 2018 that will close this issue
4 tasks
@mattdowle mattdowle modified the milestones: 1.12.0, 1.12.2 Jan 11, 2019
@jangorecki jangorecki modified the milestones: 1.12.2, 1.12.4 Jan 24, 2019
@jangorecki jangorecki added the non-equi joins rolling, overlapping, non-equi joins label May 31, 2019
@mattdowle mattdowle modified the milestones: 1.12.4, 1.13.0 Sep 19, 2019
@mattdowle mattdowle modified the milestones: 1.12.7, 1.12.9 Dec 8, 2019
@jangorecki jangorecki removed the Medium label Apr 2, 2020
@mattdowle mattdowle modified the milestones: 1.13.1, 1.13.3 Oct 17, 2020
@jangorecki jangorecki modified the milestones: 1.14.3, 1.14.5 Jul 19, 2022
@jangorecki jangorecki modified the milestones: 1.14.11, 1.15.1 Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug non-equi joins rolling, overlapping, non-equi joins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants