Aan de slagGa gratis aan de slag

Updating and replacing indices

The data stored in the index of a time series, as well as the core data, can be retrieved and manipulated as a vector in R. While the index attribute is usually a date or time, it can be a vector of unique values of any class, such as character or numeric.

In this exercise, you'll manipulate the time series coffee_2000s and coffee_2010s, which represent the average daily prices of coffee during the 2000s and 2010s, respectively.

Using lubridate and zoo, you'll manipulate and update the index of coffee_2000s, which is formatted in a day-month-Year format.

Deze oefening maakt deel uit van de cursus

Manipulating Time Series Data in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Assign the index to index_2000s
___
Code bewerken en uitvoeren