Misha at Data Sharkie takes us through the aggregate
function in R:
The aggregate() function is already built into R so we don’t need to install any additional packages.
The very brief theoretical explanation of the function is the following:
aggregate(data, by= , FUN= )
Read on to see how this works as well as examples.