I\'m trying to convert a data frame to xts object using the as.xts()-method. Here is my input dataframe q:
q
t x
1 2006-01-01 00:00:
This is clearly documented --- xts and zoo objects are formed by supplying two arguments, a vector or matrix carrying data and Date, POSIXct, chron, ... type supplying the time information (or in the case of zoo the ordering).
So do something like
qxts <- xts(q[,-1], order.by=q[,1])
and you should be set.