rowwise.ir {ir}R Documentation

Group input ir objects by rows

Description

Group input ir objects by rows

Usage

rowwise.ir(.data, ...)

Arguments

.data

Input data frame.

...

<tidy-select> Variables to be preserved when calling summarise(). This is typically a set of variables whose combination uniquely identify each row.

NB: unlike group_by() you can not create new variables here but instead you can select multiple variables with (e.g.) everything().

data

An object of class ir.

Value

data as row-wise data frame. See dplyr::rowwise().

Source

dplyr::rowwise()

See Also

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

Examples

## rowwise
dplyr::rowwise(ir_sample_data) %>%
  dplyr::mutate(
    hkl =
      mean(
        units::drop_units(klason_lignin),
        units::drop_units(holocellulose)
      )
  )



[Package ir version 0.2.1 Index]