statistic_fun_factory: Factory to generate statistical functions

View source: R/statistic.R

statistic_fun_factoryR Documentation

Factory to generate statistical functions

Description

This factory adds wrapper around statistical methods to handle na values. Additional it provides a simple way to apply a minimum required data capture rate to any function.

Usage

statistic_fun_factory(
  statistic,
  percentile = 0.95,
  threshold = NULL,
  max_gap = NULL
)

Arguments

statistic

Statistical method to generate function. Can be a name or function with one argument. See section Statistical methods in the documention of resample() for more details.

percentile

The percentile level in ⁠%⁠ used when statistic = "percentile". The default is 0.95.

threshold

optional minimum data capture threshold 0 - 1.0 to use

max_gap

optional maxium Number of consecutive NA values

Value

statistic function with one argument


Ostluft/rOstluft documentation built on Feb. 6, 2024, 1:26 a.m.