Skip to content

by=.EACHI and 'mult="first"/"last" issue #1287

@arunsrinivasan

Description

@arunsrinivasan

The segfault in issue #1271 seems to be due to an issue with current by=.EACHI functionality:

require(data.table) # tested on v1.9.4 and v1.9.5
set.seed(1L)
dt = data.table(a=c(1,1,2), b=sample(10,3), c=sample(10,3))
setkey(dt,a)[.(a=unique(a)), c := if (c-b > 0L) b, by=.EACHI, mult="first"]
# Error in `[.data.table`(setkey(dt, a), .(a = unique(a)), `:=`(c, if (c -  : 
#   Internal error: jiscols not NULL but o__ has length

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions