Sliding Windows and Calendars
summary
Two R packages implement practical rolling windows: slide does arbitrary sliding and expanding windows (type- and size-stable, variants like slide_double/slide_dfr) and slide_index lets windows be defined by a date index so irregular gaps are handled correctly; almanac builds custom business calendars and a bdays vector to shift dates by business days respecting weekends and user holidays. Together they compute a 20-business-day moving average (or rolling regressions/cumsums) over missing and irregular dates and they work as advertised.
AI-written summary · about
chapters (7)
related talks
06mIt's about time
15mAdvocating for Automation: Adapting Current Tools in Environmental Science with R
06mInsights in 5-D! (Using magic small-multiples layouts)
47mQuick and Dirty Data Science with Incanter
05mTemplated Analyses within R Packages for Collaborative, Reproducible Research
40mPHP and R - Putting the PoweR in PHP Statistics
46mElegant R: Tips from a Software Developer
19mA Journey Into Data Science: From an Idea to a Viable Product
