setCriteria: Define rules to issue a four level alert...

Description Usage Arguments Value Examples

View source: R/alert_functions.R

Description

The criteria for transition between colors (alert levels) can be chosen from existing rules or can be specified by the user. The built in rules are: Af (minimum temperature defines yellow) and Aw (humidity does), AsAw (temp min and max humidity together).

Usage

1
2
3
4
5
setCriteria(
  rule = NULL,
  values = NULL,
  delays = list(delayy = c(0, 0), delayo = c(0, 0), delayr = c(0, 0))
)

Arguments

rule

either a built-in rule ("Af", "Aw", "AsAw","Awi","AsAwi") or a list with three elements defining criteria for transition to yellow (level 2), orange (level 3) and red (level 4). See description.

values

named vector of values for the critical parameters. Use character.

delays

list with three elements, each one is a vector: c(delay to turn on, delay to turn off)

Value

list with rules. To be useful, this list must contain variables that match those in the data.

Examples

1
2
3
4
5
6
7
8
Defining values manually
val <- c("varcli" ="temp_min", "limiar_preseason"="10","limiar_epidemico"="100", "clicrit"="22"
, "clicrit2" = "80", varcli2 = "umid_max")
setCriteria(rule="Af",values=val)
setCriteria(rule="AsAw",values=val)
Using infodengue parameters:
val <- read.parameters(1200401)
setCriteria(rule=val$codmodelo, values=val)

claudia-codeco/AlertTools documentation built on Aug. 12, 2021, 9:58 a.m.