fivenum: Tukey's Five Number Summary for 'tf' vectors

View source: R/summarize.R

fivenumR Documentation

Tukey's Five Number Summary for tf vectors

Description

Computes a depth-based five number summary for functional data: the observations with minimum, lower-hinge, median, upper-hinge, and maximum depth values.

Usage

fivenum(x, na.rm = FALSE, ...)

## Default S3 method:
fivenum(x, na.rm = FALSE, ...)

## S3 method for class 'tf'
fivenum(x, na.rm = FALSE, depth = "MHI", ...)

Arguments

x

a tf vector (or numeric for the default method).

na.rm

logical; if TRUE, NA observations are removed first.

...

passed to tf_depth().

depth

depth method for ordering. See tf_depth(). Defaults to "MHI" for an up-down ordering.

Value

fivenum.tf: a named tf vector of length 5.
fivenum.default: see stats::fivenum().

See Also

Other tidyfun summary functions: functionwise, tfsummaries

Examples

set.seed(1)
f <- tf_rgp(7)
fivenum(f)

tf documentation built on April 7, 2026, 5:07 p.m.