.summary_table_2_1: Wrapper for the repetitive code in function_table_2_1. Data frame summary
Description
This internal function summarises a data frame by grouping it based on the variables specified in the 'group_by' argument and calculates the frequency of each group. The output is used in Table 2.1
Usage
.summary_table_2_1(df, group_by)
Value
A summarised data frame with groups defined by `eq5d` and `fu` variables, the count of observations in each group, and the frequency of each group.
Arguments
df
A data frame
group_by
A character vector of variables in `df` to group by. Should contain 'eq5d' and 'fu'.