report.freqTab {reporter}R Documentation

A frequency table with missing values

Description

The function creates a frequency table (with percentages and cumulative percentages) with valid values and with missing values.

Usage

report.freqTab(x, dec = 2, cumulative = TRUE, useNA = "always")

Arguments

x

A vector with the values of categorical variable.

dec

Number of decimal places for percentages.

cumulative

Wheter to report cumulative frequencies and percentages or not. Default is TRUE.

useNA

Wheter to include NA values in the table. Default is always (it includes NAs even when the count of NAs is zero), other ppossible values are no (do not include NAs) and ifany (NAs are included if they are present in the data). See ?table for more.

Note

This is a modified function freqTab from the package multiUS. The aouthor of the original function is Aleš Žiberna.

Author(s)

Marjan Cugmas

Examples

x <- mtcars$gear
x[sample(1:length(x), size = 5, replace = FALSE)] <- NA
report.freqTab(x = x, dec = 2, useNA = "always")

[Package reporter version 0.0.0.903 Index]