Created
November 29, 2013 13:13
-
-
Save IronistM/7705533 to your computer and use it in GitHub Desktop.
save an R dataframe with the name specified by a string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create explicit data frames and TS objects given a list | |
market.list<- c("GR","CY","RU","RO","PL","UA","ROW") | |
for (i in market.list) { | |
tmp <- subset(data,Market==i) | |
tmp<-ts(tmp) # It's a timeseries afterall... | |
# Let's save the data somewhere so we don't get back all the time | |
filename <- paste("data_", i, sep="") | |
assign(filename, tmp) | |
save(filename, file=paste(filename, ".rda",sep="")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment