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.
Este ejercicio forma parte del curso
Manipulating Time Series Data in R
Instrucciones del ejercicio
Assign the start point of
card_prices
to the variablecard_start
.Assign the end point of
card_prices
to the variablecard_end
.Subtract
card_start
fromcard_end
and view the result.
Ejercicio interactivo práctico
Prueba este ejercicio completando el código de muestra.
# Assign the start point to card_start
___
# Assign the end point to card_end
___
# Subtract the start point from the end point
___