textablr_diff_col: Helper Function for Summary Statistics as a LaTeX Table

Description Usage Arguments Examples

View source: R/diff_column.R

Description

Generate a column of differences and standard errors

Usage

1
textablr_diff_col(data, var_labels, group_var, group1, group2)

Arguments

data

the data

var_labels

named vector of variable labels. This is required For example, to get summaries of the 'educ' variable 'Education' and the 'expr' variable 'Experience' make this 'c("Education" = "educ", "Experience" = "expr")' Note: this also sets the order of variables in the table

group_var

the variable (if any) to group on

group1

the first group, the difference will be group1 - group2

group2

the second group, the difference will be group1 - group2

Examples

1
2
mtcars_var_labels <- c("MPG" = "mpg", "Displacement" = "disp", "Horse Power (?)" = "hp")
textablr_diff_col(mtcars, var_labels = mtcars_var_labels, "gear", 3, 5)

jamesfeigenbaum/textablr documentation built on Oct. 2, 2020, 6:05 p.m.