Rolling minimum
The zoo package has several rolling window functions for common summary statistics like mean, median, sum, etc. However, not all statistics have a rolling function, so an important skill is to be able to apply any given function to a rolling window!
In this exercise, you'll apply a function to a rolling window generated from the daily_temp time series.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Manipulating Time Series Data in R
अभ्यास निर्देश
- Create a
30-day,right-aligned rolling minimum of thedaily_temptime series and assign it totemp_roll_min.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Create the rolling minimum from daily_temp
temp_roll_min <- rollapply(___)
autoplot(___) +
theme_light() +
labs(y = 'Degrees Celsius')