Full TA Session
You all should have R and RStudio installed on your computers by now. If you do not, first install the latest version of R here: https://cran.rstudio.com (remember to select the right installer for your operating system). Next, install the latest version of RStudio here: https://www.rstudio.com/products/rstudio/download/. Scroll down to the “Installers for Supported Platforms” section and find the right installer for your operating system.
The goal of this lab is to gauge each student’s level of comfort with doing exploratory data analysis in R! and specifying regression models for small data. Since we are yet to cover any rigorous material, the TA will walk you through (in case you don’t know or have forgotten) how to specify a basic linear regression model to the data below and how to interpret the results. Also, this should be a relatively short lab, so you should use it as an opportunity to figure out the logistics of future labs, that is, check your R/RStudio installation, make sure you know how to work in R markdown and knit to .pdf, and so on.
In a classic Nature communication, Partridge and Farquhar argued that there is a physiological cost of reproduction, which is in line with many evolutionary theories. At that time, this cost had been shown experimentally for females, but no cost for sexual activity had been shown for males in which the only paternal contribution to offspring is provision of gametes.
To explore whether there is any effect of sexual activity on lifespan, researchers randomized male fruit flies to one of two groups: an isolated population of males (no sexual activity), or a mixed-gender population in which the male fruit flies were sexually active. Because body size has also been linked to longevity, we consider it here (measured by thorax length) as well.
The data are in the file fruitfly_thorax_len.csv, which contains lifespan, thorax length, and sexual activity for male fruit flies in the experiment.
The TA will walk you through how one would approach the following questions.
No submissions are required at the end of this lab.