Report 2

Author

12345678

Data

In the report, we will use a modified version of the msleep dataset from ggplot2 (Wickham 2016). Updated sleep times and weights were taken from Savage and West (2007). See Table 1 for a codebook.

Table 1: Codebook for the msleep dataset
Column Type Definition
name character common name
genus character scientific genus
vore factor type of diet
order factor scientific order
conservation factor the conservation status of the animal
sleep_total numeric total amount of sleep, in hours
sleep_rem numeric rem sleep, in hours
sleep_cycle numeric length of sleep cycle, in hours
awake numeric amount of time spent awake, in hours
brainwt numeric brain weight in kilograms
bodywt numeric body weight in kilograms

Plots

Brain:Body Weight

As the brain:body weight ratio increases, so do total sleep hours (Figure 1).

Figure 1: Total sleep by brain:body weight ratio

Diet

There is not a clear relationship between sleep and diet (Figure 2).

Figure 2: Total sleep by diet

Sleep by Order

Animals in different orders have very different median total amounts of sleep (Table 2).

Table 2: Median total sleep, REM sleep, and percent of REM sleep by order
Order Median Total Sleep
Rodentia 12.9
Carnivora 10.2
Primates 9.9

Brain:Body Weight by Diet

As the brain:body weight ratio increases, so do total sleep hours for carnivores and omnivores, but not for the other diet types (Figure 3).

Figure 3: Create your own plot and figure caption to illustrate this

References

Savage, Van M, and Geoffrey B West. 2007. “A Quantitative, Theoretical Framework for Understanding Mammalian Sleep.” Proceedings of the National Academy of Sciences 104 (3): 1051–56.
Wickham, Hadley. 2016. Ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. https://ggplot2.tidyverse.org.