textablr_means: Output and Compute Summary Statistics as a LaTeX Table

Description Usage Arguments Examples

View source: R/output_means_table.R

Description

Output summary stats results nicely.

Usage

1

Arguments

...

columns of summary statistics (means from 'textablr_mean_col' and differences from 'textablr_diff_col')

file

output location, if blank only prints to viewer with 'gt()'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# simple table
# means of mtcars for gear 3 and 4 and the difference

mtcars_var_labels <- c("MPG" = "mpg", "Displacement" = "disp", "Horse Power (?)" = "hp")

col1 <- textablr_mean_col(mtcars, var_labels = mtcars_var_labels,
  group_var = "gear", group_condition = "3")

col2 <- textablr_mean_col(mtcars, var_labels = mtcars_var_labels,
  group_var = "gear", group_condition = "4")

col3 <- textablr_diff_col(mtcars, var_labels = mtcars_var_labels,
  group_var = "gear", group1 = "3", group2 = "4")

textablr_means(col1, col2, col3)

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