freq_table: A freq_table Function

View source: R/freq_table.R

freq_tableR Documentation

A freq_table Function

Description

Tabla de frecuencias relativas, por fila columnas o global.

Usage

freq_table(
  var.cat,
  y,
  data,
  margin = NULL,
  nround = 2,
  restab = TRUE,
  title = "titles for the table",
  xtab.type = "html"
)

Arguments

var.cat

vector con el nombre de las variables categoricas a resumir

y

nombre de la variable factor principal.

data

data frame que contiene las variables a analizar

margin

index, or vector of indices to generate margin for

nround

integer indicating the number of decimal places (round).

restab

TRUE o FALSE, para obtener tabla en formato .tex or .html

title

titles for the table

xtab.type

A character string. Possible values are latex, html, markdown, pandoc, and rst; this will be automatically determined if the function is called within knitr; it can also be set in the global option knitr.table.format. If format is a function, it must return a character string.

Author(s)

Miriam Mota mmota.foix@gmail.com

Examples

# freq_table(var.cat = c('cyl','vs','gear', 'carb'), y = 'am', data = mtc_bis, restab = TRUE)

miriamMota/mmotaF documentation built on Jan. 12, 2023, 4 a.m.