createFreqTables: Function to create crosstabulation tables.

View source: R/createFreqTables.R

createFreqTablesR Documentation

Function to create crosstabulation tables.

Description

This function creates a df with all frequency tables, weighted if necessary

Usage

createFreqTables(
  df,
  rows,
  cols = NULL,
  weight = NULL,
  wide = FALSE,
  labels = "Total",
  percent = FALSE,
  addIdentifier = FALSE
)

Arguments

df

data cleaned and ready for analysis

rows

vector of variables that will be on the rows of the table

cols

vector of variables that will be on the cols of the table, to create total tables set to NULL (default)

weight

variable that identifies weights, default NULL

wide

logical, if TRUE expand for each value in cols

labels

vector of labels for cols

percent

logical, if TRUE table will have percentage instead of count

addIdentifier

logical, if TRUE column Pregunta will include identifiers.

Value

Df of frequency tables

Author(s)

Gabriel N. Camargo-Toledo gcamargo@sensata.io

Examples

TBD

SensataUX/sensataDataAnalysis documentation built on May 11, 2023, 10:59 a.m.