
Folks,
 
I understand that the to.weekly (etc.) functions work only on univariate series or OHLC objects, so I thought that the standard apply(x, 2, to.weekly) technique might work. Unfortunately, it doesn't. What am I doing wrong? Please advise.
 
> xx <- matrix(rnorm(1000), ncol=10)> xts.ts <- xts(xx, as.Date(13514:13613), origin="1970-01-01")> is.xts(xts.ts)[1] TRUE> to.weekly(xts.ts)Error in to.period(x, "weeks", name = name, ...) :   'x' must be a single column or an OHLC type object> apply(xts.ts, 2, to.weekly)Error in UseMethod("as.xts") : no applicable method for "as.xts"
I'm guessing that the individual columns of the xts.ts object are not themselves xts objects? The index info is lost?
 
I'm using R2.6.1 on Windows XP, and xts_0.0-10,  zoo_1.4-1
 
Thanks,
 
Murali
_________________________________________________________________
Climb to the top of the charts! Play the word scramble challenge with star power.

	[[alternative HTML version deleted]]

