Skip to content
Prev 302489 / 398503 Next

sapply() and by()

Using mean() to get column means is deprecated. As your Warning message
indicated:

"use colMeans or sapply(*, mean) instead"
will work or
but in this case, sapply() is just extra typing for the same result.

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352