1. Learn
  2. /
  3. Courses
  4. /
  5. Manipulating Time Series Data in R

Connected

Exercise

Custom aggregation level

The apply.*() functions from xts make for convenient aggregation, and are often the best choice functions to use, but sometimes you might want more control over the level of aggregation in your data.

In this exercise, you'll cover creating a custom level of aggregation of hourly_temperature using xts.

hourly_temperature, xts, and ggplot2 are loaded for you.

Instructions 1/3

undefined XP
    1
    2
    3
  • Using xts, create an index from hourly_temperature based on every third day – save this as three_day_index.