♣10♣Time Series Analysis
10.1 Time Series in R
Time series are lists of data points in which each data point is associated with a time-stamp. A simple example is the price of a stock in the stock market at different points of time on a given day. Another example is the amount of rainfall in a region at different months of the year. R language uses many functions to create, manipulate and plot the time series data. The data for the time series is stored in an R object called time series object. It is also a R data object like a vector or data frame.
10.1.1 The Basics of Time Series in R
10.1.1.1 The Function ts()
The time series object is created by using the
ts()
function.
Get The Big R-Book now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.