Learn R Programming

bioRad (version 0.5.1)

regularize_vpts: Regularize a time series of vertical profiles (vpts) on a regular time grid

Description

Projects objects of class vpts on a regular time grid

Usage

regularize_vpts(
  ts,
  interval = "auto",
  date_min = ts$daterange[1],
  date_max = ts$daterange[2],
  units = "secs",
  fill = FALSE,
  verbose = TRUE
)

Arguments

ts

An object inheriting from class vpts, see vpts for details.

interval

Time interval grid to project on. When 'auto' the median interval in the time series is used.

date_min

Start time of the projected time series, as a POSIXct object. Taken from ts when 'auto'.

date_max

End time of the projected time series, as a POSIXct object. Taken from ts when 'auto'.

units

Optional units of interval, one of 'secs', 'mins', 'hours','days', 'weeks'. Defaults to 'mins'.

fill

Logical, whether to fill missing timesteps with the values of the closest neighboring profile.

verbose

Logical, when TRUE prints text to console.

Value

An object of class vpts with regular time steps.

Details

Irregular time series of profiles are typically aligned on a regular time grid with the expected time interval at which a radar provides data. Empty profiles with only missing data values will be inserted at time stamps of the regular time grid that have no matching profile in the irregular time series.

In plots of regular time series (see plot.vpts) temporal gaps of missing profiles (e.g. due to radar down time) become visible. In irregular time series data points in the plot are carried through until the time series continues, and temporal data gaps are filled up visually.

Examples

Run this code
# NOT RUN {
# start form example vpts object:
data(example_vpts)
ts <- example_vpts

# regularize the time series on a 5 minute interval grid
tsRegular <- regularize_vpts(ts, interval = 300)
# }

Run the code above in your browser using DataLab