FreqTab {capm}R Documentation

Frequency table of categorical variables

Description

Calculates and sort the count and relative frequency of categories.

Usage

FreqTab(data = NULL, variables = NULL, rnd = 3, decreasing = TRUE,
  use.na = FALSE)

Arguments

data

data.frame with categorical variables.

variables

name or position of categorical variables. If more than one variable is provided, contingency frequencies are calculated.

rnd

the number of decimal places (round) or significant digits (signif) to be used.

decreasing

logical. If TRUE, frequencies will be sorted in decreasing order, if FALSE, they will be sorted in increasing order.

use.na

logical. If FALSE (default), missing values are omitted.

Value

data.frame.

References

Baquero, O. S., Marconcin, S., Rocha, A., & Garcia, R. D. C. M. (2018). Companion animal demography and population management in Pinhais, Brazil. Preventive Veterinary Medicine. http://oswaldosantos.github.io/capm

See Also

table and sort.

Examples

data(cluster_sample)
FreqTab(cluster_sample$number_of_dogs)

data(dogs)
FreqTab(dogs, c("species", "sex"))


[Package capm version 0.14.0 Index]