Lab02: Summaries By Group

Due date: 2019-09-23

We’ll use the dataset finches, that I store online. Use the following code at the top of your Quarto document for this lab to load this data set.

finches <-
read.csv("https://raw.githubusercontent.com/roualdes/data/master/finches.csv")

Read the help file about finches, to better understand the data set.

Please submit a folder containing your Quarto input (qmd) and output (html) documents for this lab, named Lab02, to our shared Google Drive folder when you are finished.

  1. Use the dplyr functions summarise and group_by to calculate the following summary statistics on a numeric variable of your choice grouped by the variable island: mean, standard deviation, median, first quartile, third quartile, minimum, and maximum (use the functions min and max, respectively).

  2. Using your calculations in 1., what type of skew, if any, does your numerical variable have for each island? Why?

  3. Explain, in the context of these data, two of your summary statistics.

  4. Make multiple histograms (in one plot) of your numerical variable, where the histograms are split on the variable island.

  5. Make box plots of your numerical variable split by the variable island.

  6. Use the dplyr function mutate to create a new ratio variable using any two numerical variables of your choice.

  7. Make box plots or histograms, whichever you prefer, split by the variable island of your new ratio variable. Explain one interesting aspect of this new numeric variable in context of the data.