On Mon, 7 Nov 2005 [EMAIL PROTECTED] wrote: >> aggregate(as.ts(c(1,2,3,4,5,6,7,8,9,10)),1/2,mean) > Time Series: > Start = 1 > End = 9 > Frequency = 0.5 > [1] 1.5 3.5 5.5 7.5 9.5 >> aggregate(as.ts(c(1,2,3,4,5,6,7,8,9,10)),1/5,mean) > Error in sprintf(gettext(fmt, domain = domain), ...) : > use format %f, %e or %g for numeric objects >> > > I must be doing something wrong, but what?
It is rounding error: 1 is just under a multiple of 1/5 (in computer representation). Try aggregate(as.ts(c(1,2,3,4,5,6,7,8,9,10)),1/5.000000000000001,mean) Clearly it needs an internal fix (and for the reporting error), and R-patched now has one. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
