```{r}
ggplot(Rosowski, aes(x=Freq, y=Absorbance, group=Sub_Number)) + 
  geom_line() + 
  facet_grid(. ~ EarStatus) + 
  scale_x_log10() + 
  ylim(0, 1) +
  labs(title="Absorbance as a function of frequency", caption = "Data from Rosowski et al, 2012")
```

```{r}
library(tidyr)
Rosowskiwide <- Rosowski %>%
  select(Sub_Number, EarStatus, Freq, Absorbance) %>%
  spread(EarStatus, Absorbance) %>%
  mutate(diff = Left - Right)
ggplot(Rosowskiwide, aes(x=Freq, y=diff, group=Sub_Number)) + 
  geom_line(colour="lightgreen") + 
  scale_x_log10() + 
  ylim(-0.5, 0.5) +
  labs(title="Difference in absorbance as a function of frequency", caption = "Data from Rosowski et al, 2012")
```

