normalize_function_list {ggplot.multistats}R Documentation

Normalize a List of Functions

Description

Takes a list of functions and function names (or a vector of function names) and names it. Requires all entries with functions to be named and adds names to functions that were specified as names.

Usage

normalize_function_list(funs)

Arguments

funs

Valid list or vector of function names and/or functions.

Value

Named list or character vector of functions.

Examples

normalize_function_list(c(value = 'mean'))
normalize_function_list(c('median', n = 'length'))
normalize_function_list(list('median', n = length))
normalize_function_list(list(Sum = sum, Custom = function(x) sum(nchar(as.character(x)))))


[Package ggplot.multistats version 1.0.0 Index]