maxima: Maxima of a univariate functional dataset

Description Usage Arguments Value See Also Examples

View source: R/correlation.R

Description

This function computes the maximum value of each element of a univariate functional dataset, optionally returing also the value of the grid where they are fulfilled.

Usage

1

Arguments

fData

the functional dataset containing elements whose maxima have to be computed, in form of fData object.

...

additional parameters.

which

logical flag specifying whether the grid values where maxima are fulfilled have to be returned too.

Value

If which = FALSE, the function returns a vector containing the maxima for each element of the functional dataset; if which = TRUE, the function returns a data.frame whose field value contains the values of maxima, and grid contains the grid points where maxima are reached.

See Also

minima

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
P = 1e3

grid = seq( 0, 1, length.out = P )

Data = matrix( c( 1 * grid,
                  2 *  grid,
                  3 * ( 0.5 - abs( grid - 0.5 ) ) ),
               nrow = 3, ncol = P, byrow = TRUE )

fD = fData( grid, Data )

maxima( fD, which = TRUE )

roahd documentation built on Aug. 24, 2018, 1:04 a.m.