rollingMax: Compute rolling max

View source: R/rollingMax.R

rollingMaxR Documentation

Compute rolling max

Description

The rolling maximum value along a series of data is computed.

Usage

rollingMax(mydata, length = 24)

Arguments

mydata

A vector of data

length

The length of data subset where the maximum values has to be picked. The value must be greater or equal than 3.

Details

It computes the maximum value centred along a subset of data.

Value

A numeric vector of the same length as mydata.

Examples

# Compute rolling max along 24 hours on hourly time series
data(airquality)
solar.R.24 <- rollingMax(mydata = airquality$Solar.R, length = 24)


simulariatools documentation built on Nov. 8, 2023, 5:07 p.m.