Motivation
Getting up to speed with R using dose-response for 32 drugs against 6 bacterial strains.
Tasks
In the following, we go through the most common steps in data analysis: exploration and transformation (i.e. deriving new variables). Integral to both steps is visualization i.e. making graphs.
Explore
As a first look, the eploratory plots are informative and serve as a quality control i.e. you know now that there is nothing extra suspicious goin on. Raw OD will suffice for that.
-
Plot growth curves following raw OD in time. Input data and expected output plot are provided. The data is for azithromycin against S. flexneri M90T from day 2022-05-04 (first replicate). A tip: Use
facet_wrap
withncol = 1
argument to have different concentrations on separate plots. -
Try again, now with data from two days (let us plot days in different color). In addition, transform the y-axis to logarithmic scale. Expected output. A tip: you need to turn the
Date
variable into a factor. -
Once more, now with data from three days. Expected output. You will encounter an issue because there were two biological replicates on third day. There are multiple ways to overcome this, but for now, I recommend to solve by using
group
parameter ofaes
e.g.ggplot(aes(..., group = Plt))
.