uniquefy_by_abs_max: Return a unique data.frame by max value

uniquefy_by_abs_maxR Documentation

Return a unique data.frame by max value

Description

Return a unique data.frame by max value

Usage

uniquefy_by_abs_max(dat, group_col = NULL, val_col = NULL)

Arguments

dat

data.frame with 1st column as string and second as numeric

group_col

string denoting group column (col with duplicates)

val_col

string denoting value column

Value

unique data.frame

Examples

set.seed(42)
dat <- data.frame(group=c('a', 'a', 'a', 'b', 'c', 'c'), vals=runif(6))
dat$vals[6] <- -4

lefeverde/lefutils documentation built on Sept. 18, 2024, 7:30 a.m.