Mastering Data Analysis with R
上QQ阅读APP看书,第一时间看更新

Chapter 3. Filtering and Summarizing Data

After loading data from either flat files or databases (as we have seen in Chapter 1, Hello, Data!), or directly from the web via some APIs (as covered in Chapter 2, Getting Data from the Web), we often have to aggregate, transform, or filter the original dataset before the actual data analysis could take place.

In this chapter, we will focus on how to:

  • Filter rows and columns in data frames
  • Summarize and aggregate data
  • Improve the performance of such tasks with the dplyr and data.table packages besides the base R methods