Skip to content

Instantly share code, notes, and snippets.

@multidis
Created April 22, 2014 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save multidis/11191971 to your computer and use it in GitHub Desktop.
Save multidis/11191971 to your computer and use it in GitHub Desktop.
Time series object from dataframe with date-class column: via zoo-class.
library(zoo)
## as time series object
fx.zoo <- zoo(x=fxsum[,-1], order.by=fxsum$Date)
head(fx.zoo)
fx.ts <- as.ts(fx.zoo)
head(fx.ts)
plot(fx.ts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment