i am using the cut function, :
cut
my_data[, ageGroup :=cut(my_data$age, breaks = c(0, ageBins), includ