Each item of
l can be a
NULL (skipped) or an empty object (0 rows).
rbindlist is most useful when there are a variable number of (potentially many) objects to stack, such as returned by
rbind however is most useful to stack two or three objects which you know in advance.
… should contain at least one
rbind(...) to call the fast method and return a
rbindlist(l) always returns a
data.table even when stacking a plain
list with a
data.frame, for example.
<= v1.9.2, each item for
rbindlist should have the same number of columns as the first non empty item.
rbind.data.table gained a
fill argument to fill missing columns with
v1.9.2, which allowed for
rbind(...) binding unequal number of columns.
> v1.9.2, these functionalities were extended to
rbindlist (and written entirely in C for speed).
use.names argument, which is set to
FALSE by default for backwards compatibility. It also contains
fill argument as well and can bind unequal columns when set to
With these changes, the only difference between
rbindlist(l) is their default argument
i of input items do not all have the same type; e.g, a
data.table may be bound with a
list or a column is
factor while others are
character types, they are coerced to the highest type (SEXPTYPE).
Note that any additional attributes that might exist on individual items of the input list would not be preserved in the result.