Learn R Programming

ir (version 0.4.1)

separate_rows.ir: Separate a collapsed column in an ir object into multiple rows

Description

Separate a collapsed column in an ir object into multiple rows

Usage

separate_rows.ir(data, ..., sep = "[^[:alnum:].]+", convert = FALSE)

Value

data with a collapsed column separated into multiple rows. See tidyr::separate_rows().

Arguments

data

An object of class ir.

...

<tidy-select> Columns to separate across multiple rows

sep

Separator delimiting collapsed values.

convert

If TRUE will automatically run type.convert() on the key column. This is useful if the column types are actually numeric, integer, or logical.

See Also

Other tidyverse: arrange.ir(), distinct.ir(), extract.ir(), filter-joins, filter.ir(), group_by, mutate, mutate-joins, nest, pivot_longer.ir(), pivot_wider.ir(), rename, rowwise.ir(), select.ir(), separate.ir(), slice, summarize, unite.ir()

Examples

Run this code
## separate_rows
ir_sample_data |>
  tidyr::unite(
    col = content, holocellulose, klason_lignin
  ) |>
  tidyr::separate_rows(
    col
  )


Run the code above in your browser using DataLab