minMax: summaryFunction for minimum and maximum

Description Usage Arguments Value See Also Examples

View source: R/minMax.R

Description

A summaryFunction, intended to be called from summarize, which returns the minimum and maximum values of a variable. NA, NaN and Inf values are removed prior to the computations.

Usage

1
minMax(v, maxDecimals = 2)

Arguments

v

A variable (vector) of type numeric or integer.

maxDecimals

A positive integer or Inf. Number of decimals used when printing numerical values in the data summary and in problematic values from the data checks. If Inf, no rounding is performed.

Value

An object of class summaryResult with the following entries: $feature ("Min. and max."), $result (the minimum and maximum of v), and $value (minimum and maximum in their orignial format).

See Also

summaryFunction, summarize, summaryResult, allSummaryFunctions

Examples

1
minMax(c(1:100))

dataMaid documentation built on Oct. 8, 2021, 9:08 a.m.