Skip to content

Instantly share code, notes, and snippets.

@jseabold
Created January 3, 2014 20:46
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 jseabold/8246270 to your computer and use it in GitHub Desktop.
Save jseabold/8246270 to your computer and use it in GitHub Desktop.
Write dates to file in R. Must be a better way. What is this? SAS?
library(fpp)
data(usmelec)
write.csv(as.data.frame(list(date=as.Date(usmelec), usmelec=coredata(usmelec))), "usmelec.csv", row.names=FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment