melt_by_listcol | R Documentation |
Expands a list column in a data.table to an atomic vector, adding rows as necessary.
melt_by_listcol(dt, column)
dt |
data.table. |
column |
Name or index of list column. |
A data.table with rows added to accommodate the expansion of the list column.
Other helper functions: capitalize_words
,
ch1903_to_wgs84
,
clean_strings
,
format_addresses
,
format_scientific_names
,
is.empty
, lvapply
,
na.remove
,
normalize_language
,
parse_scientific_names
,
quotemeta
,
replace_values_in_list
,
sp_transform
,
subset_search_results
,
unique_na
str(dt <- data.table::data.table(label = list(list("a", "b"), list("c")), count = c(1, 2)))
melt_by_listcol(dt, "label")
melt_by_listcol(dt, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.