# \donttest{
# Load the dataset
data(barnswallow_brightness)
# Basic exploration
head(barnswallow_brightness)
summary(barnswallow_brightness)
# Compare brightness between social and extra-pair males
boxplot(barnswallow_brightness$PairB_bright, barnswallow_brightness$EPB_bright,
names = c("Social Male", "Extra-pair Male"),
main = "Comparison of Belly Brightness",
ylab = "Brightness")
# Correlation between social and extra-pair male brightness
plot(barnswallow_brightness$PairB_bright, barnswallow_brightness$EPB_bright,
main = "Correlation between Social and Extra-pair Male Brightness",
xlab = "Social Male Belly Brightness",
ylab = "Extra-pair Male Belly Brightness")
abline(lm(EPB_bright ~ PairB_bright, data = barnswallow_brightness), col = "red")
# }
Run the code above in your browser using DataLab