split_by: Split by key preserving order

View source: R/aaa.R

split_byR Documentation

Split by key preserving order

Description

Split by key column while preserving order according to the first occurence. R base split converts keys to factors, changing default order to alphanumeric.

Usage

split_by(.data, key)

Arguments

key

variable to split by

Value

a list of tibbles

Examples

tibble::tibble(x = c(1, 1, 1, 2), y = c("B", "A", "B", "B"), z = "foo") %>%
  split_by(x)

thackl/gggenomes documentation built on Aug. 31, 2024, 9:47 p.m.