View source: R/continuousTimeIntervals.R
continuousTimeIntervals | R Documentation |
The measurements are fitted into timesteps defined be the first point of time and a temporal resolution
continuousTimeIntervals( time_vector, data_vector, res = 15, first_pointOfTime = min(time_vector, na.rm = T), last_pointOfTime = max(time_vector, na.rm = T) )
time_vector |
A POSIXct vector |
data_vector |
A numeric vector, with data corresponding to the time_vector |
res |
Temporal resolution in minutes |
first_pointOfTime |
Starting point (POSIXct) of the newly defined time series. By default the minimum of the time_vector |
last_pointOfTime |
End point (POSIXct) of the newly defined time series. By default the maximum of the time_vector |
In a first step a vactor is generated with continuous timesteps, starting at first_pointOfTime by a defined time interval. Subsequently, the measured data is forced into timesteps with a similar time interval. Here, the measurements are assigned to the timestep that is closest to the actual time of measurements. If more than one measurement are assigned to one timestep, the average is used. If there is no measurement, NA is used.
Dataframe with POSIX column "t" and data column "d"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.