unnest_wider | R Documentation |
Unnest a list-column of vectors into a wide data frame
unnest_wider(
.df,
col,
names_sep = NULL,
simplify = NULL,
names_repair = "check_unique",
ptype = NULL,
transform = NULL
)
.df |
A data.table or data.frame |
col |
Column to unnest |
names_sep |
If |
simplify |
Currently not supported. Errors if not |
names_repair |
Treatment of duplicate names. See |
ptype |
Optionally a named list of ptypes declaring the desired output type of each component. |
transform |
Optionally a named list of transformation functions applied to each component. |
df <- tidytable(
x = 1:3,
y = list(0, 1:3, 4:5)
)
# Automatically creates names
df %>% unnest_wider(y)
# But you can provide names_sep for increased naming control
df %>% unnest_wider(y, names_sep = "_")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.