unnest {tidySingleCellExperiment} | R Documentation |
Given a regular expression with capturing groups, extract()
turns
each group into a new column. If the groups don't match, or the input
is NA, the output will be NA.
cols |
< |
names_sep |
If If a string, the inner and outer names will be used together. In |
keep_empty |
See tidyr::unnest |
names_repair |
See tidyr::unnest |
ptype |
See tidyr::unnest |
.drop |
See tidyr::unnest |
.id |
tidyr::unnest |
sep |
tidyr::unnest |
.preserve |
See tidyr::unnest |
.data |
A tbl. (See tidyr) |
.names_sep |
See ?tidyr::nest |
data |
A tidySingleCellExperiment object |
col |
Column name or position. This is passed to
This argument is passed by expression and supports quasiquotation (you can unquote column names or column positions). |
into |
Names of new variables to create as character vector.
Use |
regex |
a regular expression used to extract the desired values.
There should be one group (defined by |
remove |
If |
convert |
If NB: this will cause string |
... |
Additional arguments passed on to methods. |
A tidySingleCellExperiment objector a tibble depending on input
A tidySingleCellExperiment objector a tibble depending on input
A tidySingleCellExperiment objector a tibble depending on input
separate()
to split up by a separator.
library(dplyr) pbmc_small %>% nest(data=-groups) %>% unnest(data) library(dplyr) pbmc_small %>% nest(data=-groups) %>% unnest(data) pbmc_small %>% extract(groups, into="g", regex="g([0-9])", convert=TRUE)