Get startedGet started for free

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.

This exercise is part of the course

Manipulating Time Series Data in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Create the index from every third day.
___ <- ___
Edit and Run Code