Skip to contents

Tidy rowwise optimum (default to pmax) of several columns

Usage

rowwise_optimum(
  .tbl,
  ...,
  optimum = "max",
  max_name = "pmax",
  min_name = "pmin",
  na_rm = TRUE,
  keep = "all"
)

Arguments

.tbl

A tibble

...

Unquoted numeric column names

optimum

Should we calculate "max", "min" or "both"? Default to TRUE

max_name

Column name for the mutated pmax

min_name

Column name for the mutated pmin

na_rm

Remove NAs. Default to TRUE

keep

To be used within mutate. Default to "all".

Value

A tibble with pmax, pmin or both (and all columns or none, depending on "keep")