On Mar 2, 2012, at 3:51 PM, knavero wrote:

aggregate(z, identity, mean)
 1   2   3   4   5
1.0 3.0 5.0 6.0 7.5
aggregate(z, mean)
Error: length(time(x)) == length(by[[1]]) is not TRUE

As generally happens when you call a function and fail to provide enough arguments to fill up its formals list.


Can someone help me understand the error above and why "identity" is
necessary to satisfy the error

Well on my machine it throws an error, probably because you failed to provide the requested code to create the objects you were working on. Is 'z' so sort of special classed object for which there is an aggregate method? Is 'identity' a list as expected by aggregate.default or aggregate.data.frame? It would be an unfortunate choice of an object name, since there is a function with that nam.

--
David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to