เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

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.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Manipulating Time Series Data in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Create the index from every third day.
___ <- ___
แก้ไขและรันโค้ด