desp: Apply despiking to a given subset

View source: R/Quality_checking.R

despR Documentation

Apply despiking to a given subset

Description

This is a low level function not intended to be used on its own. It is utilized by despikeLF that should be used instead.

Usage

desp(xBlock1, xBlock2 = xBlock1, refBlock1, refBlock2 = refBlock1, z, c)

Arguments

xBlock1

The double-differenced var time series with appropriate block size.

xBlock2

Serves for computing despiking threshold and can be from the same block as xBlock1 (default) or from the whole year (more conservative when less data available).

refBlock1

var values from appropriate block for finding false-flagged spikes by comparison with scaled median absolute deviation.

refBlock2

var values for computing median and mad from the same block as refBlock1 (default) or whole year (more conservative when less data available).

z

A numeric value. MAD scale factor.

c

A numeric value. mad scale factor. Default is 3 * mad constant (i.e. 3 * 1.4826 = 4.4478).

Value

A logical vector. TRUE values flag spikes.

See Also

use despikeLF instead.


lsigut/openeddy documentation built on Aug. 5, 2023, 12:25 a.m.