Learn R Programming

multiUS (version 1.2.3)

freqTab: Create a frequency table

Description

The function creates a frequency table with percentages for the selected categorical variable.

Usage

freqTab(x, dec = 2, cum = TRUE, ...)

Value

A frequency table (as a dataframe).

Arguments

x

Vector with the values of a categorical variable.

dec

Number of decimal places for percentages.

cum

whether to calculate cumulative frequencies and percentages (default TRUE).

...

Arguments passed to function table.

Author

Aleš Žiberna

Examples

Run this code
freqTab(mtcars[,2], dec = 1)

Run the code above in your browser using DataLab