safest way to subset (and replace) a data.table

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

safest way to subset (and replace) a data.table

Benjamin Tyner

I would like to replace a data.table 'DT' with a subset of itself, where
the subset is determined by an expression 'expr' which evaluates to
logical. Thus far I've been using:

    DT <- DT[expr, ]

however this frequently results in a SIGABRT from glibc of the form:

    "double free or corruption (!prev): 0x00000000c08662b40"

I've tried under the latest version of R and the latest version of data
table, but the issue still persists. So now I'm wondering if I'm doing
it the wrong way.

Any advice?



[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.