blockMax: Compute block maxima of a vector

View source: R/chunk.R

blockMaxR Documentation

Compute block maxima of a vector

Description

Compute block maxima of a vector

Usage

blockMax(x, blockSize, overlap = 0, type = "C++", na.rm = FALSE)

Arguments

x

Vector that is split into blocks

blockSize

Integer, size of each block.

overlap

Integer, number of overlapping data points.

type

Toggle between C++ ("C++") and R ("R"), see chunk.

na.rm

Boolean, is passed on to max

Value

Returns List, with the maximum per block (blockMax) and an indicator if chunk has produced NaN values. Then the index of the first NaN (firstNaN) is returned. This happens if the blockSize does not divide the length of x without remainder; see chunk.


KlausHerrmann/khermisc documentation built on May 6, 2023, 7:08 p.m.