Assignment information: (delete this when you submit) In this assignment you will re-build the pie graphs shown in the paper “Genomics is failing on diversity” by Popejoy and Fullerton (https://www.nature.com/articles/538161a). Delete all instructions and replace with short explanatory text about all code chunks. Be sure to change the title in the YAML header.

If possible, save this file to your Teams folder.

Introduction

Write a brief introduction about the data being plotted, including the information

  1. who collected it,
  2. how it was collected,
  3. why the process was repeated in 2016

This should be about 4-5 sentences.

Create data

Create vectors to contain the data and labels to make the pie graphs at the top of figures.

Each vector has 3 elements: European ancestry, Asian ancestry, and other non-European ancestry.

DO NOT name your vector for the labels “labels”, since this is the name of an existing R function.

Include new line characters in the text as needed to improve spacing.

Pro Tip: adding a new line character in front of the text or behind it in your labels and help you adjust spacing. E.g. “European” or “” (note - if you don’t delete this instruction the preceding text will have some weird features.)

Plot

  1. Create a 1 x 2 grid using the command par(mfrow = c(1,2))
  2. Plot the 2009 data on the left and 2016 data on the right.
  3. Use the argument main = … to add a title to above the plots
  4. Set the argument init.angle = … to -82. Experiment with how this affects the plot.
  5. Set the argument radius = … to 1. Experiment with how this affects the plot.
  6. Set the argument col = … to c(1,2,3), then experiment with different numbers.