[R] Warning message with aggregate function
Uwe Ligges
ligges at statistik.uni-dortmund.de
Thu Sep 6 10:48:34 CEST 2007
Xingwang Ye wrote:
> Dear all,
> When I use aggregate function as:
>
> attach(warpbreaks)
> aggregate(warpbreaks[, 1], list(wool = wool, tension = tension), sum)
>
> The results are right but I get a warning message:
> "number of items to replace is not a multiple of replacement length."
>
> BTW: I use R version 2.4.1 in Ubuntu 7.04.
Does not happen for me, neither with R-2.4.1 nor with recent versions of
R. Maybe you have redefined one of the used objects (aggregate,
warpbreaks, wool, tension, sum) in one of your environments?
BTW: Is is always a bad idea to make much use of attach()...
Uwe Ligges
> Your kind solutions will be great appreciated.
>
> Best wishes
>
> Yours, sincerely,
> Xingwang Ye
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
More information about the R-help
mailing list