FreqTab: Frequency table of categorical variables

Description Usage Arguments Value References See Also Examples

Description

Calculates and sort the count and relative frequency of categories.

Usage

1
2
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

1
2
3
4
5
data(cluster_sample)
FreqTab(cluster_sample$number_of_dogs)

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

oswaldosantos/capm documentation built on May 24, 2019, 5:02 p.m.