| listCol_w {splitstackshape} | R Documentation |
Flattens a column stored as a list into a wide form.
listCol_w(inDT, listcol, drop = TRUE, fill = NA_character_)
inDT |
The input dataset. |
listcol |
The name of the column stored as a |
drop |
Logical. Should the original column be dropped? Defaults to |
fill |
The desired fill value. Defaults to |
A data.table.
Ananda Mahto
listCol_l to unlist a list column into a "long" format.
dat <- data.frame(A = 1:3, B = I(list(c(1, 2), c(1, 3, 5), c(4)))) listCol_w(dat, "B")