example_data <- data.frame(
variable = c("A", "A", "B", "B"),
ageband = c("0-4", "5-9", "0-4", "5-9"),
observed = c(10, 20, 15, 25),
population = c(1000, 1200, 1100, 1300)
)
direct_age_standardise(
data = example_data,
var = "variable",
ageband = "ageband",
observed = "observed",
population = "population"
)
Run the code above in your browser using DataLab