EventIndTimeDifference: Calculates the Difference of Time between two Events

View source: R/EventIndTimeDifference.R

EventIndTimeDifferenceR Documentation

Calculates the Difference of Time between two Events

Description

Low level function that calculates the distance w.r.t the time of at least two Events Using Indices

Usage

EventIndTimeDifference(Timevector,EndInd,BeginInd,Resolution='mins',Silent=FALSE)

Arguments

Timevector

[1:n] POSIXlt vecttor of time

EndInd

[1:m] Ending Indices

BeginInd

[1:m] Beginning Indices

Resolution

Resolution of difference like 'mins','hours','days'

Silent

default (TRUE), if FALSE, error warnings amd stops disabled

Details

Timevector uses POSIXlt, which stores a list of day, month, year, hour, minute, second, etc. EventIndTimeDifference() assumes for Timevector, that all list-values within are in the same time zone.

Value

diff[1:m] Duration of Event

Note

POSIXct stores seconds since UNIX epoch (+some other data), the conversion to POSIXlt can be done by this function only if UTC time zone is assumed.

Author(s)

Michael Thrun


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