stat_extract: A universal statistic extractor.

View source: R/utils.R

stat_extractR Documentation

A universal statistic extractor.

Description

calculates the requested statistic for a numeric vector. NAs are removed prior to analysis

Usage

stat_extract(eda_object, fun, stat_name, plain = FALSE, ...)

Arguments

eda_object

an eda object.

fun

a statistic calculation function, should return a single numeric.

stat_name

name of the statistic included in the output data frame.

plain

logical, should the output be coerced to a single vector?

...

extra argument passed to fun.

Value

a tibble or a numeric value.


PiotrTymoszuk/ExDA documentation built on Nov. 17, 2024, 5:46 p.m.