Description Usage Arguments Value Note
View source: R/getweeklyaverages.R
Calculates the weekly averages of the metrics per geo.
1 2 3 4 | GetWeeklyAverages(obj, ...)
## S3 method for class 'GeoTimeseries'
GetWeeklyAverages(obj, na.rm = TRUE, ...)
|
obj |
an object. |
... |
further arguments passed to or from other methods. |
na.rm |
(flag) remove NAs? |
A data frame with one row per 'geo', and the weekly averages of each metric in the columns.
Does not handle incomplete weeks. Each week is supposed to have the
complete total sales of the week. If for example the first and last
weeks of a daily data set are incomplete, the weekly average will be
underestimated. Works for both weekly and daily data. The averages are
calculated by first calculating the weekly sums for each geo, and then
taking the averages over the weeks. NA
s are removed by default.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.