convert.to.weekly | R Documentation |
Use this function to convert time-series data (currently implemented: daily) to time-series data with weekly frequency.
convert.to.weekly(variable, weekStart, aggregateFun)
variable |
A variable. |
weekStart |
Determines the start day of the week, can be |
aggregateFun |
Function to aggregate data within each interval. |
See the details section of the convert.to.daily
function.
A variable with weekly frequency.
startFreq <- f.daily(c(2022, 9, 1))
v <- variable(c(1,2,3,4,5,6,7,8), startFreq)
w <- convert.to.weekly(v, "mon", function(x)mean(x, na.rm=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.