EventTimeFilter: Calculate Duration of Events and Time Difference between...

View source: R/EventTimeFilter.R

EventTimeFilterR Documentation

Calculate Duration of Events and Time Difference between Events

Description

High level function that calculates time difference between events (if more than one) and duration of events, as well as the Counts of events.

Usage

EventTimeFilter(Time,Feature,

units='mins',PeriodBetweenEvents=1,formating="(%y-%m-%d %H:%M:%S)"

,Timezone='UTC',Silent=FALSE)

Arguments

Time

[1:n] Time, a chron object or a POSIXlt object or a character vector, Devicespezifische Zeit, if not chron object, please adjust format neceassry It hast to be convertible to character

Feature

[1:n,1] vector of string or Values where the event has to be searched in, list cannot be interpreted, dataframes are converted to matrices. It is assumed that the time row defines the time of the corresponding row of EventArrayOrEvent

formating

default="(%y-%m-%d %H:%M:%S)", else check strptime function

units

character string of units of time for output: "secs", "mins", "hours", "days"

PeriodBetweenEvents

numerical value in time units specified in units, time betweed two events which is assumed that it interrupts one event into several events (e.g. due to data quality) but is in reality only one event. default =0, in that case the approximation of events by filtering is turned of

Timezone

sometimes durations and time difference cannot be calculated if timezone is not chosen, default: 'UTC'

Silent

default (FALSE), if TRUE, error warnings regarding events disabled

Details

sometimes there issues in the quality of data, than its usefull to define a period of time between two events, where one assumes that both events reprent only one event, in that case chose for PeriodBetweenEvents a value above zero

Value

FilteredFeature

[1:n,1] vector of string or Values where time periods below PeriodBetweenEvents are filled up with values to clear "false" zeros

Note

for details on formating and Timezone check the strptime function.

Author(s)

Michael Thrun


Mthrun/TSAT documentation built on Feb. 5, 2024, 11:15 p.m.