Homework Assignment #1.5

For each step, make sure your markdown document prints the relevant output, so that I can see that your code works.

Problem 1 - wrangling with dplyr

  1. Load the Howell’s craniometric dataset into R. This dataset includes 82 measurements on 2524 human crania from 28 populations (measurement abbreviations detailed in this pdf). Note that a 0 indicates missing data in this dataset, so make sure to specify this when you read in the data.
  2. Evaluate the structure of the dataframe using the str() function to make sure that it got read in correctly. It should have 2524 observations of 86 variables.
  3. Create a new dataframe called selected_cols which contains only the Sex, XFB, OBB, and SIS varibles
  4. Add a new column called product to the new dataframe that is the product of the XFB, OBB, and SIS variables (i.e. multiply all three columns together to create this new column).
  5. group the selected_cols by sex, and create 3 summary columns with the minimum, maximum, and mean values for the product column, by sex. Hint: the result dataframe should contain 2 rows and 4 columns, including the Sex column.