Learn R Programming

sjmisc (version 1.2)

frq: Summary of labelled vectors

Description

This function prints a summary, including frequency table, of labelled vectors. Unlike summary, the frq method also prints label and missing attributes.

Usage

frq(x)

Arguments

x
A labelled vector.

Value

  • A data frame with the summary information of x.

Examples

Run this code
# create labelled factor, with missing flag
x <- labelled(c("M", "M", "F", "X", "N/A"),
              c(Male = "M", Female = "F",
                Refused = "X", "Not applicable" = "N/A"),
              c(FALSE, FALSE, TRUE, TRUE))

frq(x)

Run the code above in your browser using DataLab