blockMaxCpp: Compute block maxima of a vector via C++

View source: R/chunk.R

blockMaxCppR Documentation

Compute block maxima of a vector via C++

Description

Compute block maxima of a vector via C++

Usage

blockMaxCpp(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. If there is no NaN value the indicator is zero. For the computation all NA and NaN values are ignored.


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