add_age_bin.Rd
add age time bin
add_age_bin(
data_source,
age_var_name = "age",
bin_var_name = "BIN",
bin_size = 1000,
sel_method = c("backward", "forward")
)
Data frame with age represented by age_var_name
variable.
Character. Name of the column with age.
Character. Name of the new colun with binned ages.
Numeric. Size of the time bin.
Character. Which direction should the values be binned.
"backward"
- c(59, 105) -> c(0, 100)
"forward"
- c(59, 105) -> c(100, 200)