Skip to content

Instantly share code, notes, and snippets.

@jseabold
Created January 3, 2014 20:46
Show Gist options
  • Select an option

  • Save jseabold/8246270 to your computer and use it in GitHub Desktop.

Select an option

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