Aggregating in R

Kevin Feasel

2019-08-28

R

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

WVPlots

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

Categories

August 2019
MTWTFSS
« Jul Sep »
 1234
567891011
12131415161718
19202122232425
262728293031