48 Simulate 5 different samples of 20 colonists each from our original pool

samples <- replicate(5, sample_n(colonists, 20), simplify = FALSE)

This code uses the replicate() function to draw five random samples from our colonist dataset. Each sample consists of 20 individuals, allowing us to see how smaller groups might vary from the full population.

Repeated Sample Analysis Now, let’s dive into these samples. We want to uncover any patterns or inconsistencies that emerge from repeatedly sampling our colonist pool. Are some combinations of skills and demographics more successful than others? Does the distribution of roles affect the group’s overall health or technical capabilities?