exc_Area: Excursion area

View source: R/Analyses_functions_1.R

exc_AreaR Documentation

Excursion area

Description

Computes the excursion area where a time series X(t) is greater or lower than the constant level A for the provided time interval or its sub-interval.

Usage

exc_Area(X, A, N = 10000, level = "greater", subI = NULL, plot = FALSE)

Arguments

X

Data frame where the first column is a numeric time sequence t and the second one is the values of the time series X(t).

A

Constant level as a numeric value.

N

Number of steps on the time interval (or time sub-interval) used for computations. Default set to 10000.

level

A vector of character strings which specifies whether the excursion area is required for X, "greater" or "lower" than A. Default set to "greater".

subI

Time sub-interval is a vector, where the lower bound is the first element and the upper bound is the second. Optional: If provided, the excursion area for the sub-interval is returned, otherwise the whole time interval is considered.

plot

Logical: If TRUE, the time series, constant level and excursion area are plotted in interactive sessions.

Value

Excursion area.

See Also

sojourn

Examples

t <- seq(0, 1, length = 1000)
TS <- data.frame("t" = t, "X(t)" = rnorm(1000))
exc_Area(TS, 0.8, level = 'lower', subI = c(0.5, 0.8), plot = TRUE)


Rmfrac documentation built on Sept. 10, 2025, 10:31 a.m.