uniquefy_by_abs_max | R Documentation |
Return a unique data.frame by max value
uniquefy_by_abs_max(dat, group_col = NULL, val_col = NULL)
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 |
unique data.frame
set.seed(42)
dat <- data.frame(group=c('a', 'a', 'a', 'b', 'c', 'c'), vals=runif(6))
dat$vals[6] <- -4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.