Exercise tapply and split functions