The ts class is one of the most common formats for time series data and is widely used in the domain of forecasting. In this chapter, we focused on the main attributes of the ts class and its associated functions from the stats package. Those attributes will be handy when we dive more into time series analysis in the advanced chapters of this book. In addition, we introduced common methods for visualizing a ts object with the basic plot function, as well as advanced visualization tools from the dygraph and TSstudio packages.
The main advantage of the ts class is that it sets a clear standard about both the structure and attributes of the time series object in R. On the other hand, due to the unique structure of the ts object, preprocessing and working with it could be cumbersome, with respect to other data classes in R, such as data.frame.
In the next chapter, we will...