ages_as_ordered {halk} | R Documentation |
In order for the machine learning models to properly predict ages, the known ages should be converted to an ordered factor during model fitting. This will ensure that the predict.* functions return age values that actually make sense.
ages_as_ordered_factor(data, age_col = "age")
ages_as_integer(data, age_col = "est.age")
data |
A data.frame with a column corresopnding to |
age_col |
Character. The name of the column that contains ages |
A data.frame with the values in age_col
converted to an
ordered factor