There are several different functions and methods available in R to compute statistics or, more generally, apply functions to groups of observations within a data set. The tapply() function is one such function, but there are others that are more flexible and powerful. These approaches produce results similar to those obtained in SAS when using a BY statement to generate results in each of several "by-groups". In this series of three videos we talk about three approaches for such "by-processing" in R. We start with the aggregate() function, which we introduce and illustrate in this video.
The aggregate() function is available in base R, so you are likely to see it used in others' code. Therefore, it is worth knowing about. On the other hand, it is not necessary to know all three methods of by-processing covered in this series of videos and the approach based on aggregate() is not the most powerful. Therefore, you could skip this video if you strongly wish to save time. But be sure to (at least) watch "By-Processing - Part 3".