Guest User

Untitled

a guest
Feb 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. sa_final=0
  2. series <- read.csv("path", sep="t", dec=",")
  3.  
  4. for (i in 2:k){
  5. y <- ts(series[,i], frequency=12)
  6. y[!is.finite(y)] <- 0
  7.  
  8. #some calculations
  9. ....
  10. #trying to merge all time series
  11. time <-seq.Date(from=as.Date("2001-01-01"), by="months", length.out = n )
  12. sa <- xts(y, order.by=time)
  13. sa_final <- cbind(sa_final, sa)
  14. }
Add Comment
Please, Sign In to add comment