MakeCountTablesGroup: Get counts and percentages from a table split by a grouping...

View source: R/MakeCountTablesGroup.R

MakeCountTablesGroupR Documentation

Get counts and percentages from a table split by a grouping parameter

Description

!!! This function has been depreciated – just use MakeCountTables instead Takes an input table and calculates the total and percentages for each variable per group In order to ensure one row per observation, a id_var parameter is required as id_var

Usage

MakeCountTablesGroup(data, id_var = "MRN", group_var = "CMD", sum_vars)

Arguments

data

the input table

id_var

the row-identifier column

group_var

the parameter to split the calculations by

sum_vars

a vector of variables from the table to perform the operation on

Examples

out <- MakeCountTablesGroup(data, id_var="MRN", group_var="Included_in_Study", sum_vars=c("Etiology", "Race", "Gender"))
print(out$Etiology)

kwdoyle/kevtools documentation built on Jan. 4, 2023, 10:32 p.m.