Aggregating in R

Kevin Feasel



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.

Related Posts


Nina Zumel announces a new version of WVPlots on CRAN: WVPlots was originally a catch-all package of ggplot2 visualizations that we at Win-Vector tended to use repeatedly, and wanted to turn into “one-liners.” A consequence of this is that the older visualizations had our preferred color schemes hard-coded in. More recent additions to the package sometimes had palette […]

Read More

Icon Maps in R

Laura Ellis shows how you can build maps full of little icons: That was ok, but we should try to make the images more aesthetically pleasing using the magick package. We make each image transparent with the image_transparent() function. We can also make the resulting image a specific color with image_colorize(). I then saved the […]

Read More


August 2019
« Jul Sep »