Advertisement

Data Aggregation

Part of the Use R! book series (USE R)

R provides a wide array of functions to aid in aggregating data. For simple tabulation and cross-tabulation, the table function is available. For more complex tasks, the available functions can be broken down into two groups: those that are designed to work effectively with arrays and/or lists, like apply, sweep, mapply, sapply, and lapply, and those that are oriented toward data frames (like aggregate and by). There is considerable overlap between the two tools, and the output of one can be converted to the equivalent of the output from another, so often the choice of an appropriate function is a matter of personal taste.

We'll start by looking at the table function, and then study the other functions which can be used to aggregate data from various sources.

Keywords

Data Aggregation Data Frame Table Function Split Function Single Vector 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer Science+Business Media, LLC 2008

Personalised recommendations