15.071 | Spring 2017 | Graduate

The Analytics Edge

1.3 Working with Data: An Introduction to R

1.3 Working with Data: An Introduction to R

Quick Question

Use the tapply function to find the average child mortality rate of countries in each region.

Which region has the lowest average child mortality rate across all countries in that region?

  
  
  
  
  
  

Explanation You can find the average child mortaility rate of countries in each region by using the following command: tapply(WHO$ChildMortality, WHO$Region, mean) The output tells us that Europe has the lowest average child mortality rate across all countries, with an average of 10.05.

Course Info

As Taught In
Spring 2017
Level
Learning Resource Types
Lecture Videos
Lecture Notes
Problem Sets with Solutions