Time Series Analysis in R
David S. Matteson
Associate Professor at Cornell University
ts()
functiondata_vector
10 6 11 8 10 3 6 9
time_series <- ts(data_vector)
plot(time_series)
time_series <- ts(data_vector, start = 2001, frequency = 1)
plot(time_series)
is.ts()
function checks whether an object is of the ts()
class:is.ts(data_vector)
FALSE
is.ts(time_series)
TRUE
Why create and use time series objects of the ts() class?
Time Series Analysis in R