1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation with dplyr

Exercise

Calculating the percentage of women in a county

The dataset includes columns for the total number (not percentage) of men and women in each county. You could use this, along with the population variable, to compute the fraction of men (or women) within each county.

In this exercise, you'll select the relevant columns yourself.

Instructions

100 XP
  • Select the columns state, county, population, men, and women.
  • Add a new variable called proportion_women with the fraction of the county's population made up of women.