create_table: Automatically generate ready-to-publish descriptive tables

Description Usage Arguments Value

View source: R/create_table.R

Description

This function loads a data frame and returns a statistical summary table for each categorical or numeric variables. Optionally, it generates stratified summary tables. Output tables can be customized by removing those variables that are not of interest for either the overall summary or the stratified one.

Usage

1
2
3
4
5
6
7
create_table(
  df,
  var_removed = NULL,
  var_removed_strat = NULL,
  var_desc = NULL,
  by_row = F
)

Arguments

df

Data frame to be summarized as a table.

var_removed

Variables to be removed from the overall summary.

var_removed_strat

Variables to be removed from the stratified summary.

var_desc

Variable to create stratified tables from.

by_row

Logical. If TRUE it will display the % for each stratified group by row. By default, the % by column is displayed.

Value

A list containing at most two data frames: one for the overall summary table, another for the stratified summary table.


gerardgimenezadsuar/smartables documentation built on Dec. 20, 2021, 10:40 a.m.