Calculate Spending within a Class
1 | calc_spending_in_class(DT, cost_var, DT_id, id_vars, xwalk)
|
DT |
data.table with all elements of id_vars as well as lab_prod |
cost_var |
character, name of the cost variable to use |
DT_id |
data.table data.table with all elements of id_vars |
id_vars |
character vector, names of variables to aggregate on |
xwalk |
data.table with columns lab_prod as well as any indicators (usually atc1-4 or rxcui) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.