View source: R/report.freqTab.R
report.freqTab | R Documentation |
The function creates a frequency table (with percentages and cumulative percentages) with valid values and with missing values.
report.freqTab(
catVarName,
data,
dec = 2,
dec.freq = 0,
cumulative = FALSE,
useNA = "always",
language = "english",
sort.cat = FALSE,
total.row = TRUE
)
catVarName |
The name of a categorical variable. |
data |
A data frame or an object of class |
dec |
Number of decimal places for percentages. Default is |
dec.freq |
Number of decimal places for frequencies. Defaults is |
cumulative |
Wheter to report cumulative frequencies and percentages or not. Default is |
useNA |
Wheter to include NA values in the table. Default is |
language |
The language used for displaying the statistics in the frequency table. This parameter accepts two values: |
sort.cat |
A logical or character value that specifies whether and how the categories of the frequency table should be sorted. If |
total.row |
Logical; if 'TRUE', adds a total row at the bottom of the frequency table. Default is |
This is a modified function freqTab
from the package multiUS
. The author of the original function is Aleš Žiberna.
Marjan Cugmas
report.freqTab(catVarName = "gear", dec = 2, useNA = "always", data = mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.