rm_spikes {hydroToolkit}R Documentation

Remove spikes

Description

Removes spikes, and sets their value to NA_real_.

Usage

rm_spikes(df, tolerance)

Arguments

df

data frame with date and numeric variable in the first and second column respectively (from read_XXX functions).

tolerance

numeric with maximum tolerance between a number and its successor.

Value

The same data frame but without peaks.

Examples

# Relative path to raw data
full_path <- system.file('extdata', package = "hydroToolkit")

# Read IANIGLA file
cuevas <- read_IANIGLA(file = 'Cuevas.csv', path = full_path)             

# Remove spikes from air temperature series
tair_rm_spikes <- rm_spikes(df = cuevas, tolerance = 10)


[Package hydroToolkit version 0.1.0 Index]