# creates two equal sized groups
Fingers$Height_2 <- ntile(Fingers$Height, 2)
# designates the new variable as a factor and labels the group numbers
Fingers$Height_2_factor <- factor(Fingers$Height_2, levels = c(1, 2), labels = c("short", "tall"))
# check the data frame
head(select(Fingers, Height, Height_2, Height_2_factor))