# To access the tsdl library in R, type the following commands: install.packages("devtools") # this takes a while to install all the dependency packages... devtools::install_github("FinYang/tsdl") # installs the 'tsdl' package. library(tsdl) # loads the 'tsdl' package after it has been installed. ### If the above code doesn't work for you, try this: ### UPDATE (Fall 2023): This second approach seemed MUCH quicker and easier for me. Try this way first: install.packages("remotes") remotes::install_github("FinYang/tsdl") library(tsdl) ### help(package='tsdl') # opens a help file for the 'tsdl' package. tsdl #gives a summary of the available time series data sets in 'tsdl' meta_tsdl$subject # A vector listing the subjects of each of the 648 data sets in 'tsdl' meta_tsdl$description # short descriptions of all the data sets in 'tsdl' # To get the description of just one of the data sets (say, the first), type: meta_tsdl$description[[1]] meta_tsdl$source # the sources of all the data sets in 'tsdl' meta_tsdl$frequency # A vector listing the frequencies of all the data sets in 'tsdl' meta_tsdl$frequency[1] # The frequency of the first data set in 'tsdl' meta_tsdl$start # A vector listing the starting times of all the data sets in 'tsdl' # To save one of the tsdl data sets (say the first data set of the 648 data sets), you could do a command like: Iowa.ts <- tsdl[[1]] # All the 'tsdl' data sets are already ts objects, so 'Iowa.ts' would already be a 'ts' object ready for analysis.