# to control the randomness
set.seed(47)
# first create a data frame with the Infant data
Infants <- read.delim("http://www.rossmanchance.com/iscam3/data/InfantData.txt")
# find the observed number of babies who chose the helper
help_obs <- Infants |>
summarize(prop_help = mean(choice == "helper")) |>
pull()
help_obs
[1] 0.875