fix_fun_amf: Fix 'fun' parameter to 'aggregate_multiple_fun'

View source: R/aggregate_multiple_fun.R

fix_fun_amfR Documentation

Fix fun parameter to aggregate_multiple_fun

Description

Fix fun parameter to aggregate_multiple_fun

Usage

fix_fun_amf(fun)

Arguments

fun

fun

Value

fun

Examples

identical(fix_fun_amf("median"), c(median = median))

identical(fix_fun_amf(c("sum", "median")), c(sum = sum, median = median))

ff <- c("sum", "median", "cor")
names(ff) <- c("", NA, "Correlation")
identical(fix_fun_amf(ff), c(sum, median = median, Correlation = cor))

identical(fix_fun_amf(structure("median", names = "")), fix_fun_amf(median))

SSBtools documentation built on Oct. 30, 2024, 5:09 p.m.