This means "all other variables." That is, those data variables that are not otherwise present in the formula.
In the first expression, this is Sepal.Length , Sepal.Width , Petal.Length , Petal.Width , as can be seen from running the command:
aggregate(. ~ Species, data = iris, mean) Species Sepal.Length Sepal.Width Petal.Length Petal.Width 1 setosa 5.006 3.428 1.462 0.246 2 versicolor 5.936 2.770 4.260 1.326 3 virginica 6.588 2.974 5.552 2.026
This statement is equivalent to:
aggregate(cbind(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width) ~ Species, data = iris, mean)
source share