summarize_all_numeric: Summarize All Numeric Variables

Description Usage Arguments Value Examples

Description

This function allows you to calculate mean and sd for all numeric variables in a dataset

Usage

1
2
summarize_all_numeric(df, num_vars, grouping_var, num_display = "PM",
  show_pval = TRUE, digits = 1)

Arguments

df

Dataset containing covariates of interest

num_vars

Vector of numeric variables

grouping_var

Variable to group by (will be columns of table)

num_display

How should results be displayed? ('PM' for mean +- sd, 'PRS' for mean (sd))

show_pval

Logical. Should the p-value results be displayed?

digits

Number of digits to round decimals

Value

A data frame summarizing mean/sd of covariate at each level of grouping variable

Examples

1
2
3
4
## Not run: 
quantify_numeric(covariate = age, df = obpv_baseline, grouping_var = obpv_quintile, digits = 1)

## End(Not run)

jjwillard/wfbmcphsr documentation built on May 14, 2019, 5:01 a.m.