I want to create some mean of sepal.length, but divided by species. Using mosaic
package
mean(Sepal.Length~Species)
It didn't work
A base R solution
aggregate(Sepal.Length ~ Species, data=iris, mean)
Species Sepal.Length
1 setosa 5.006
2 versicolor 5.936
3 virginica 6.588