R/maxBy.R

Defines functions maxBy

maxBy = function(xs, getKey) {
  keys = lapply(xs, getKey)
  xs[[which.max(keys)]]
}
akopich/covcp documentation built on April 14, 2021, 5:54 p.m.