mutar, crear categorías

data6 <- data6 %>% 
  mutate(age3cat = cut(agea, breaks=c(0,39,65,Inf), labels=c("young", "middle-aged", "old")))
Diana H