Assignment 6

In this assignment, you will use R (within R-Studio) to:

All file paths should be relative, starting from your Assignment_6 directory!!

This means that you need to create a new R-Project named “Assignment_6.Rproj” in your Assignment_6 directory, and work from scripts within that.

For credit…

  1. Push a completed version of your Rproj and R-script (details at end of this assignment) to GitHub
  2. Your score will also depend on whether any files generated in this workflow are found in your repository

First, we can load the tidyverse package and import an untidy data set

library(tidyverse)
dat <- read_csv("../../Data/BioLog_Plate_Data.csv") # you may need to modify this path to fit where this file is stored relative to your assignment 6 script

As you might be able to tell from the column names, this data set is all about the ability of various environmental samples to utilize different carbon sources. Each plate has 96 wells and in each well is a fluorescently labeled carbon source. You dilute an environmental sample and add it to each of the wells in a plate and then read light absorbance over time. Higher absorbance values indicate more utilization of that carbon source by the microbes present in the sample.

Here, we have real data from 4 environmental samples (two soil and two water samples), and their absorbance values at 24, 48, and 144 hours. These plate experiments were repeated at 3 increasing dilutions for each sample source.

Your task is to Write an R script that:

  1. Cleans this data into tidy (long) form
  2. Creates a new column specifying whether a sample is from soil or water
  3. Generates a plot that matches this one (note just plotting dilution == 0.1):

  1. Generates an animated plot that matches this one (absorbance values are mean of all 3 replicates for each group):

This plot is just showing values for the substrate “Itaconic Acid”