4.3.time.handlers {pems.utils}R Documentation

pems Data Time Handlers

Description

Time handlers are subset of pems.utils functions that work on or with time records (time.stamp and local.time).

Usage


regularize(data, Hz=1, ...)

repairLocalTime(data, local.time, ref, ..., reset.count = TRUE,
      fun.name = "repairLocalTime")

Arguments

data

(Required, typically pems) The dataset to be worked with. For regularize, the dataset to regularize (see below).

Hz

(For regularize) (Required numeric) The time resolution to regularize the data to in Hertz. So, the default, Hz=1 is one measurement (or row of data) per second.

...

(Optional) Other arguments, typically passed on.

local.time

(For repairLocalTime) (Required pems.element) The local.time pems.element to work been repaired.

ref, reset.count

(For repairLocalTime) (Other arguments) ref is a second source that local.time can be inferred from in cases where local.time records are missing. If TRUE, reset.count resets local.time so it starts at 0.

fun.name

(character) (pems handler) argument used by pems.utils. These can typically be ignored.

Details

regularize attempts to extrapolate a regular series, generated at the time resolution requested, from the supplied data. It can be useful for the regularization of irregularly time-logged data and for hole-filling missing records but should not be used aggressively, to convert 1Hz to 10Hz data.

repairLocalTime attempts to repair an incomplete local.time record. For example, if you merge two datasets with overlapping but different time ranges, one may not track the time range of the other and this can generate incomplete time records. This function attempts to hole-fill such cases.

Value

regularize returns the supplied dataset (data) with time-series (time.stamp and local.time) are regularized at the requestion time resolution, based on Hz value. It uses approx the estimate associated changes for other data-series.

repairLocalTime returns a repaired local.time pem.element, typically the supplied local.time with any holes (NAs) it can fill filled.

Note

All time handlers should be used with care.

Author(s)

Karl Ropkins

References

regularize uses approx:

Base R Stats package function based on Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

A lot of leg-work testing regularize was done by then Leeds MSc Student Adrian Felipe Ortega Calle.

See Also

approx regarding data regularization methods.


[Package pems.utils version 0.2.29.1 Index]