From the course: Cleaning Bad Data in R

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Aggregations and missing values

Aggregations and missing values

From the course: Cleaning Bad Data in R

Start my 1-month free trial

Aggregations and missing values

- [Narrator] One particular place where you need to exercise caution is when you use aggregate functions on data sets that contain missing values. You'll want to understand what those missing values mean, and how they impact your analysis. Aggregate functions summarize data in a data set to help us better understand the data. You likely use them all the time. Common examples of aggregate functions are calculating the mean or average of a variable, determining the median value of the variable, finding the maximum or minimum value and calculating the sum of all the values from a variable. Think for a moment about how missing values might impact these functions. For example, consider the National Forest data set that we looked at in the last video. Here's the original data set that we loaded. The sum of these values is 192,272,000 acres and we have 42 rows of data. Now how would you calculate the mean of this data set? Well, you'd probably divide the total by the number of rows and you'd…

Contents