Learn R Programming

fChange (version 2.1.0)

minmax: Max / Min for dfts Objects

Description

Get the observation(s) or pointwise values with the min / max values. When using type='Obs', the selected observation is the one with the minimum or maximum mean. When using type='fparam', the values are given pointwise.

Usage

# S3 method for dfts
max(x, type = c("Obs", "fparam"), na.rm = TRUE, ...)

# S3 method for dfts min(x, type = c("Obs", "fparam"), na.rm = TRUE, ...)

Value

A dfts object.

Arguments

x

A dfts object or data which can be automatically converted to that format. See dfts().

type

String indicating if finding for observation ('Obs'), or for pointwise values ('fparam').

na.rm

Boolean if NA values should be removed. Defaults to TRUE.

...

Additional parameters to pass to base R's min or max functions. They are only used in the type='fparam' case.

Examples

Run this code
results <- max(electricity)
results <- min(electricity)

Run the code above in your browser using DataLab