R -programming on Linear Time Series