powered by
Flattens a column stored as a list into a wide form.
list
listCol_w(inDT, listcol, drop = TRUE, fill = NA_character_)
The input dataset.
The name of the column stored as a list.
Logical. Should the original column be dropped? Defaults to TRUE.
TRUE
The desired fill value. Defaults to NA_character_.
NA_character_
A data.table.
data.table
listCol_l to unlist a list column into a "long" format.
listCol_l
# NOT RUN { dat <- data.frame(A = 1:3, B = I(list(c(1, 2), c(1, 3, 5), c(4)))) listCol_w(dat, "B") # }
Run the code above in your browser using DataLab