named_group_split: Split grouped data with names. A wrapper around...

View source: R/general_bioinfo.R

named_group_splitR Documentation

Split grouped data with names. A wrapper around dplyr::group_by() ref: https://github.com/tidyverse/dplyr/issues/4223

Description

Split grouped data with names. A wrapper around dplyr::group_by() ref: https://github.com/tidyverse/dplyr/issues/4223

Usage

named_group_split(.tbl, ..., keep_order = TRUE)

Arguments

.tbl

a data frame

...

arguments pass to dplyr::group_by()

keep_order

logical, default TRUE, whether to maintain original order of the groups.

Value

a named list

Examples

## Not run: 
a <- tibble::tibble(x = 1:5, y = sample(letters[1:5]))
a  %>% named_group_split(y)
a  %>% named_group_split(y , keep_order = FALSE)

## End(Not run)



cparsania/parcutils documentation built on April 23, 2024, 1:09 p.m.