
library(xts)
library(TTR)

ndx = getYahooData("^NDX")
aa = ndx$Close
bb = aggregate(aa, as.yearweek, tail, 1)

The last operation takes forever, and then the bb dates are messed up. The following produces the desired result:

time(aa) = as.Date(time(aa))
bb = aggregate(aa, as.yearweek, tail, 1)

The index of ndx and aa is of POSIXct (as reported by is(time(ndx))) , which apparently causes problems. Isn't zoo (and xts) supposed to work properly regardless of the type of index? Is this a bug in one of the libraries?

Thanks in advance,
Ivan
 		 	   		  
_________________________________________________________________
30 days of prizes: Hotmail makes your day easier! Enter Now.

	[[alternative HTML version deleted]]

