infection: infection: Parasite Infections

infectionR Documentation

infection: Parasite Infections

Description

This data set contains information on gender, weight, and age of individuals with and without a parasite infection.

Usage

infection

Format

A data frame with 81 observations (rows) and 4 variables (columns).

Column name Data type Description Values
[,1] infected integer Parasite infection, 1 if infected, otherwise 0 (0, 1)
[,2] age integer The age of the individual (1 - 206)
[,3] weight integer The weight of the individual (1 - 18)
[,4] sex factor The gender (female male)

infected is the binary response variable, and age, weight (both continuous) and sex (categorical) are explanatory variables.

Source

⁠The R book⁠, M.J. Crawley, Wiley, 2013.

Examples


# The relationship between infection and gender
table(infection$infected, infection$sex)

# Get two boxplots next to each other
par(mfrow = c(1, 2))
boxplot(weight ~ infected, data = infection, col = "lightgreen")
boxplot(age ~ infected, data = infection, col = "lightgreen")

# Reset to default settings
par(mfrow = c(1, 1))


thoree/stat340 documentation built on June 30, 2024, 4:04 p.m.