| rowwise {tidyseurat} | R Documentation |
Group input by rows
Description
rowwise() allows you to compute on a data frame a row-at-a-time.
This is most useful when a vectorised function doesn't exist.
Most dplyr verbs preserve row-wise grouping. The exception is summarise(),
which return a grouped_df. You can explicitly ungroup with ungroup()
or as_tibble(), or convert to a grouped_df with group_by().
Usage
## S3 method for class 'Seurat'
rowwise(data, ...)
Arguments
data |
Input data frame. |
... |
< NB: unlike |
Value
A row-wise data frame with class rowwise_df. Note that a
rowwise_df is implicitly grouped by row, but is not a grouped_df.
List-columns
Because a rowwise has exactly one row per group it offers a small
convenience for working with list-columns. Normally, summarise() and
mutate() extract a groups worth of data with [. But when you index
a list in this way, you get back another list. When you're working with
a rowwise tibble, then dplyr will use [[ instead of [ to make your
life a little easier.
See Also
nest_by() for a convenient way of creating rowwise data frames
with nested data.
Examples
# TODO