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