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

Comparing temporal attributes

The start and end points of a time series are stored like any other date or time object in R, meaning you can perform tests to compare them, as well as perform arithmetic to determine the time interval between them.

Use your R skills to manipulate the temporal attributes of card_prices – a time series of the daily prices of a card from a popular trading card game.

The card_prices time series, and the zoo and lubridate packages, are available to you.

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

Manipulating Time Series Data in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Assign the start point of card_prices to the variable card_start.

  • Assign the end point of card_prices to the variable card_end.

  • Subtract card_start from card_end and view the result.

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

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

# Assign the start point to card_start
___

# Assign the end point to card_end
___

# Subtract the start point from the end point
___
แก้ไขและรันโค้ด