iDatamining.org

I am looking for projects to work on
Please contact with me at yiyu.jia@BostonInfoPro.com!

Thursday, September 19, 2013

time series analysis using R



  1. download and install MRO from https://mran.revolutionanalytics.com/download/ 
  2. install.packages("TTR")
  3. library("TTR")
  4. usindices $lt;- read.table("http://www2.stat.duke.edu/~mw/data-sets/ts_data/industrial_production", skip=20, header = F)
  5. colnames(usindices) $lt;- c("YR","MN", "IP", "MFG", "MFGD", "MFGN", "MIN", "UTIL", "P", "MAT")
  6. head(usindices)
  7. install.packages("dplyr") 
  8. library(dplyr)
  9. avg1 = summarise(group_by(usindices,YR),avg = mean(MFG))
    
  10. plot(avg1)
  11. install.packages("reshape")
  12. library("reshape")
  13. 
    
tutorial: http://a-little-book-of-r-for-time-series.readthedocs.org/en/latest/src/timeseries.html

No comments:

Post a Comment