-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
2- I suggest adding one more argument to
cbindlist, in the spirit ofidcolarguement inrbindlist, that prefixes the output column names with the names of the source data when the list of data being joined is named. See below.
l = list(x=data.table(a=1,b=2), y=data.table(a=10,b=20))
$x
a b
<num> <num>
1: 1 2
$y
d b
<num> <num>
1: 10 20
# current/default behavior
cbindlist(l)
a b d b
<num> <num> <num> <num>
1: 1 2 10 20
# feature request behavior
cbindlist(l, prefix=TRUE)
x.a x.b y.d y.b
<num> <num> <num> <num>
1: 1 2 10 20
Originally posted by @Kamgang-B in #4370 (comment)