If I use your code, I don't get the error.
Maybe you stripped your code to create a minimal, self-contained,
reproducible code?
Perhaps in your original code, you store the result of the aggragate
function in a dataframe of a different size than the results?
Bart
felix-36 wrote:
>
> Dear al
Thank you for sharing your experience.
The example data I used is from help for "by" function, so every one
could have a try.
After using $, the warning message disappeared:
aggregate(warbreaks[,1], list(wool = warbreaks$wool,
tension=warbreaks$tension),sum)
Another approach may be to restart y
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."
>
> B