resilience.events: Calculate Resilience by Failure Event

Description Usage Arguments Value

View source: R/resilience_functions.R

Description

Calculates resilience indices (see Matzinger et al. 2018) for each failure event in time series of performance P(t). Failure is defined by acceptable performance Pa and maximal failure Pmax.

Usage

1
resilience.events(time_stamp, Pt, Pa, Pmax, evtSepTime, signalWidth)

Arguments

time_stamp

vector containing timestamp (sorted in ascending order)

Pt

vector with performance P(t) (same length as timestamp)

Pa

accpetable performance

Pmax

maximal failure

evtSepTime

"event separation time" in seconds. Maximal allowed time difference between two consecutive timestamps within the same event.

signalWidth

"signal width" in seconds. Length of time interval that one timestamp is representing, e.g. 5*60 = 300 if each timestamp respresents a time interval of five minutes (as e.g. a time series is recorded on a five minute time scale). This parameter is needed to calculate event durations.

Value

Returns data.frame containing one row by failure event. First columns are identical to kwb.event::hsEvents. Following columns are additional resilience indices:

script is stopped if no failure event with message "Pa never exceeded"


KWB-R/kwb.resilience documentation built on Jan. 9, 2020, 5:44 p.m.