exceedances: Compute exceedances of a threshold for a time series

View source: R/aaa_generics.R

exceedancesR Documentation

Compute exceedances of a threshold for a time series

Description

Compute exceedances of a threshold for a time series

Usage

exceedances(x, ...)

## Default S3 method:
exceedances(x, ...)

## S3 method for class 'nhpp'
exceedances(x, ...)

## S3 method for class 'ts'
exceedances(x, ...)

## S3 method for class 'double'
exceedances(x, threshold = mean(x, na.rm = TRUE), ...)

Arguments

x

a numeric vector coercible into a stats::ts object

...

arguments passed to methods

threshold

A value above which to exceed. Default is the mean()

Value

An ordered integer vector giving the indices of the values of x that exceed the threshold.

Examples

# Retrieve exceedances of the series mean
fit_nhpp(DataCPSim, tau = 826) |> 
  exceedances()

# Retrieve exceedances of a supplied threshold
fit_nhpp(DataCPSim, tau = 826, threshold = 200) |> 
  exceedances()

tidychangepoint documentation built on April 4, 2025, 4:31 a.m.