h_condition: Conditional extraction of a time-series regarding another one

h_conditionR Documentation

Conditional extraction of a time-series regarding another one

Description

The series to proceed is the first of the list, the conditional series the second. Only the common record dates are kept.

Usage

h_condition(files, condition)

Arguments

files

Liste de 2 file names

condition

Liste 3 objects : oper ("sup" or "inf" or "between"), thrhd1 < thrhd2 ; default is c("inf",0,NA)

Details

If the condition on the file 2 value is not respected, the value of file 1 is changed as NA.

The condition has 3 options : x< ("inf"), x>= ("sup"), < x <= ("between"). In case of error or by default, "inf" is considered. In the cases "inf" and "sup", only one threshold is used (thrhd1) ; in the case "between", two thresholds are needed (thrhd1 < thrhd2).

The output file is the name of the fist file with a cd_ prefix.

Author(s)

P. Chevallier - Oct 2017-Jan 2019

Examples

## Not run: 

f <- h_condition(c(f1,f2), c("between", O, 2))

## End(Not run)


htsr documentation built on Oct. 13, 2023, 5:10 p.m.