View source: R/fct_inspection.R
check_sum_vars | R Documentation |
This function tests whether the sum of selected variables are equal to another.
check_sum_vars(..., df, outcome, digits = 3)
... |
character vector. This character vector contains the name of the variables of which the sum will be checked. |
df |
a dataframe. |
outcome |
character string. Name of variable of the dataframe which should equal the sum of variables mentioned in '...'. |
digits |
Define the number of digits at which the sum and the 'outcome' variables are rounded. Default is 3 digits. |
A string.
# Checking whether health state and adverse event costs equal the total discounted costs
check_sum_vars("t_costs_pfs_d_int", "t_costs_pd_d_int", "t_costs_ae_int",
df = head(df_pa),
outcome = "t_costs_d_int",
digits = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.