I have a series of data.frame like
r t
1 x 2
2 y 3
3 z 4
but I want to convert these three into time series, like
q = xts(as.matrix(data[1,]), order.by = "2011-09-28")
qq = xts(as.matrix(data[2,]), order.by = "2011-09-28")
qqq = xts(as.matrix(data[3,]), order.by = "2011-09-28")
My question is that since each time I only change rownames (1,2,3) and the names q qq qqq, may I sum them up into only one comment? like implement some functions?