Exercise 1.2
Code
Questions
- Try summarizing the data with a different function for one or more of the variables.
- What is the median value of polyarchyfor The West?
- What is the max value of gdp_pcfor Eastern Europe?
- What is the standard deviation of flfpfor Africa?
- What is the interquartile range of women_repfor the Middle East?
- Now try grouping by country instead of region.
- What is the median value of polyarchyfor Sweden?
- What is the max value of gdp_pcNew Zealand?
- What is the standard deviation of flfpfor Spain?
- What is the interquartile range of women_repfor Germany?
- Sort countries in descending order based on the mean value of - gdp_pc(instead of the median value of- polyarchy). Which country ranks first based on this sorting?
- Now try sorting countries in ascending order based on the median value of - women_rep(hint: delete “desc” from the- arrange()call). Which country ranks at the “top” of the list?
