univariate_tables: Dispatcher for (qualitative/quantitative) univariate tables...

View source: R/tables_univariate.R

univariate_tablesR Documentation

Dispatcher for (qualitative/quantitative) univariate tables and statistics.

Description

Dispatcher for (qualitative/quantitative) univariate tables and statistics.

Usage

univariate_tables(
  x,
  wb = NULL,
  latex = TRUE,
  exclude = NULL,
  style = c("raw", "type"),
  date_preproc = function(d) factor(format(d, "%Y-%m")),
  mr_prefixes = NULL,
  univ_perc_params = list(),
  univ_quant_params = list(),
  univ_quali_params = list()
)

Arguments

x

a data.frame

wb

a WorkBook

latex

use latex for printing (default = TRUE)

exclude

character vector of data.frame name to be ignored

style

if 'raw' display variables in the order given, if 'type' display variable by type

date_preproc

function to preprocess Date columns. By default make them Year-month factors; currently only factor, numerics and 0-1 variable are not ignored, therefore date_preproc should be a coercer to those types

mr_prefixes

variable name prefixes (character vector); each of these identify a set of variable who belong to the same multiple response question (if done with smarty_mr_splitter this should end with "_")

univ_perc_params

other options (named list) for univ_perc

univ_quant_params

other options (named list) for univ_quant

univ_quali_params

other options (named list) for univ_quali

Examples


wb = openxlsx::createWorkbook()
univariate_tables(airquality, wb = wb)
lbmisc::wb_to_xl(wb = wb, file = '/tmp/univariate_tables.xlsx')


lbraglia/lbstat documentation built on Sept. 17, 2023, 2:30 p.m.