row_max: Row Maximum / Minimum

Description Usage Arguments Note Examples

Description

Return the row maximum / minimum for columns ... in a tibble x using tidy evaluation

Usage

1
2
3

Arguments

...

columns of the tibble to compute the rowwise maximum on, must be numeric

Note

passes the max function to row_numeric_function which applys the max functions to rows

Examples

1
2
3
4
5
6
7
8
9
library(tidyverse)

x <- tribble(~x1,    ~x2,      ~x3,
             "dog",   2,        4,
             "cat",   NA_real_, 5.5,
             "mouse", 40,       20)

row_max(x, x2, x3, new_col_name = "max_x2_x3")
row_min(x, x2, x3, append_col = FALSE)

neilcuz/panenkar documentation built on June 19, 2021, 7:31 p.m.