Skip to contents

Extracts and rounds a rate value from a data.table based on indicator, variant, and rate type.

Usage

get_rounded_rate(ind, var, rte, dta, digits = 1)

Arguments

ind

String, indicator name

var

String, variant name (e.g., "overall", "dementia", "no dementia")

rte

String, name of the rate column

dta

data.table, the data to extract rate from

digits

Integer, number of decimal places (default: 1)

Value

Character string of the rounded rate

Examples