Learn R Programming

bruceR (version 0.6.0)

Freq: Frequency statistics.

Description

Frequency statistics.

Usage

Freq(var, label = NULL, sort = "", nsmall = 1)

Arguments

var

Vector or variable.

label

[optional] A vector re-defining the labels of values.

sort

"" (default, sorted by raw order), "-" (decreasing order), or "+" (increasing order).

nsmall

Number of decimal places of output. Default is 1.

Value

A data frame of frequency statistics.

Examples

Run this code
# NOT RUN {
Freq(bfi$education)
Freq(bfi$gender, label=c("Male", "Female"))
Freq(bfi$age)

# }

Run the code above in your browser using DataLab