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

Connected

Exercise

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.

Instructions

100 XP
  • 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.