How to plot timeseries R ? A time series graph represents the change of values of a variable over a period of time. It is a data visualization tool that illustrates the change in values at consecutive intervals of time. Time series plots are useful for dealing with examples like tracking the stock in the stock market at different times, the temperature change over a period of time etc. This recipe demonstrates an example on timeseries.
Syntax for creating timeseries plot - ts(data,start,end,frequency) where, data - input data start - start time for the first observation end - end time for the last observation frequency - number of observations
# time series graph of random numbers over a period of 12 time units. data <- c(10,2,5,6,8,15,12,3,6,14,11,7)
data_timeseries <- ts(data, start = 0 , end = 12 ,frequency = 1) plot.ts(data_timeseries)