unnest | R Documentation |
Unnest expands a list-column containing data frames into rows and columns.
## S3 method for class 'tidyseurat_nested'
unnest(
data,
cols,
...,
keep_empty = FALSE,
ptype = NULL,
names_sep = NULL,
names_repair = "check_unique",
.drop,
.id,
.sep,
.preserve
)
unnest_seurat(
data,
cols,
...,
keep_empty = FALSE,
ptype = NULL,
names_sep = NULL,
names_repair = "check_unique",
.drop,
.id,
.sep,
.preserve
)
'tidyseurat'
tidyr 1.0.0 introduced a new syntax for nest()
and unnest()
that's
designed to be more similar to other functions. Converting to the new syntax
should be straightforward (guided by the message you'll receive) but if
you just need to run an old analysis, you can easily revert to the previous
behaviour using nest_legacy()
and unnest_legacy()
as follows:
library(tidyr) nest <- nest_legacy unnest <- unnest_legacy
Other rectangling:
hoist()
,
unnest_longer()
,
unnest_wider()
data(pbmc_small)
pbmc_small |>
nest(data=-groups) |>
unnest(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.