time series analysis and its applications with R examples