[R] converting dataframe into multiple time series

Bill william108 at gmail.com
Sun Aug 24 02:52:35 CEST 2014


Hello. Can someone suggest how to do this:

for (i in 2:length(colnames(allvar.df))) {
var=colnames(allvar.df)[i]
timeSeriesName = paste(var,".time.series")
varRef=paste(var,".df$",var)
varDate=paste(var,".df$date")
timeSeriesName <- ts(varRef,
start = c(year(min(varDate)),month(min(varDate))),
end = c(year(max(varDate)),month(max(varDate))),
frequency=12)
}

	[[alternative HTML version deleted]]



More information about the R-help mailing list