BinTimeseries | R Documentation |
Convert a continuous time series to a discrete (regular) timeseries by binning, preserving any empty bins. Additionally returns the number of data points in each bin
BinTimeseries(
time.var,
value.var,
bin.width,
strt.time = NULL,
end.time = NULL
)
time.var |
time variable, a vector |
value.var |
value variable, a vector |
bin.width |
with of time bins in output |
strt.time |
first time value in output, defaults to min(time.var) - bin.width/2 |
end.time |
last time values in output, defaults to max(time.var) + bin.width/2 |
a dataframe
Andrew Dolman <andrew.dolman@awi.de>
set.seed(20230312)
x <- cumsum(rgamma(20, shape = 1.5, rate = 1.5/10))
y <- SimProxySeries(a = 0.1, b = 1, t.smpl = x)
BinTimeseries(x, y, bin.width = 15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.