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.
In this "Part 3" video, we introduce the ddply() and summarise() functions from the plyr package. Each of these functions can be useful in its own right, but they are very powerful for by-processing when used in combination. In this video we introduce both functions, show how each works through examples, and then show how to use them in combination.
Of the three approaches covered in this series of videos on by-processing, the use of ddply() and summarise() is the most powerful and elegant. Therefore, you should definitely watch this video.