set_threshold {hydroToolkit}R Documentation

Set a threshold

Description

Set tolerable extreme values (maximum or minimum). Records greater or equal than ('>=') or lesser or equal than ('<=') 'threshold' argument are set to NA_real_.

Usage

set_threshold(x, threshold, case = ">=")

Arguments

x

numeric vector or data frame with a numeric series in the second column.

threshold

numeric value with threshold.

case

string with either '>=' (greater or equal than) or '<=' (lesser or equal than) symbol.

Value

Numeric vector or data frame with values greater (or lesser) or equal than 'threshold' set as NA_real_.

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)             

# Set threshold from air temperature series
tair_thres <- set_threshold(x = cuevas, threshold = 40)


[Package hydroToolkit version 0.1.0 Index]