A time series can be thought of as a list of numbers (measurement) along with the time those number were recorded (index).
In the tidyverse, we use
tsibbleobject to save a time series in R.
head(global_economy)
## # A tsibble: 6 x 6 [1Y] ## # Key: Country [1] ## Year Country GDP Imports Exports Population ## <dbl> <fct> <dbl> <dbl> <dbl> <dbl> ## 1 1960 Afghanistan 537777811. 7.02 4.13 8996351 ## 2 1961 Afghanistan 548888896. 8.10 4.45 9166764 ## 3 1962 Afghanistan 546666678. 9.35 4.88 9345868 ## 4 1963 Afghanistan 751111191. 16.9 9.17 9533954 ## 5 1964 Afghanistan 800000044. 18.1 8.89 9731361 ## 6 1965 Afghanistan 1006666638. 21.4 11.3 9938414
- Year -
index - Country -
Key - GDP, imports, Exports, Pop -
Measurament