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

segfault combining on= with by=.EACHI and mult= #1271

Closed
arunsrinivasan opened this issue Aug 14, 2015 · 0 comments
Closed

segfault combining on= with by=.EACHI and mult= #1271

arunsrinivasan opened this issue Aug 14, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@arunsrinivasan
Copy link
Member

require(data.table)
set.seed(1L)
dt = data.table(a=c(1,1,2), b=sample(10,3), c=sample(10,3))
#    a b  c
#1: 1 3 10
#2: 1 4  2
#3: 2 5  8
dt[.(a=unique(a)), c := if (c-b > 0L) b, on="a", by=.EACHI] # warning (rightfully so)
dt[.(a=unique(a)), c := if (c-b > 0L) b, on="a", by=.EACHI, mult="first"] # <~~~ segfault
dt[.(a=unique(a)), c := if (c-b > 0L) b, on="a", by=.EACHI, mult="last"] # <~~~ segfault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant