Tapply function

Apply a Function to a Variable Within Factor Levels