Skip to contents

These will return a tf object containing the respective functional statistic. See tf_fwise() for scalar summaries (e.g. tf_fmean for means, tf_fmax for max. values) of each entry in a tf-vector.

Usage

# S3 method for tf
mean(x, ...)

# S3 method for tf
median(x, na.rm = FALSE, depth = c("MBD", "pointwise"), ...)

sd(x, na.rm = FALSE)

# S3 method for default
sd(x, na.rm = FALSE)

# S3 method for tf
sd(x, na.rm = FALSE)

var(x, y = NULL, na.rm = FALSE, use)

# S3 method for default
var(x, y = NULL, na.rm = FALSE, use)

# S3 method for tf
var(x, y = NULL, na.rm = FALSE, use)

# S3 method for tf
summary(object, ...)

Arguments

x

a tf object

...

optional additional arguments.

na.rm

logical. Should missing values be removed?

depth

method used to determine the most central element in x, i.e., the median. One of the functional data depths available via tf_depth() or "pointwise" for a pointwise median function.

y

NULL (default) or a vector, matrix or data frame with compatible dimensions to x. The default is equivalent to y = x (but more efficient).

use

an optional character string giving a method for computing covariances in the presence of missing values. This must be (an abbreviation of) one of the strings "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs".

object

a tfd object

Value

a tf object with the computed result.

summary.tf returns a tf-vector with the mean function, the variance function, the functional median, and the functional range (i.e., pointwise min/max) of the central half of the functions, as defined by tf_depth().

See also

tf_fwise()

Other tidyfun summary functions: functionwise