Learn R Programming

crosstable (version 0.8.0)

apply_labels: Batch set variable labels

Description

This function is a copycat of from expss package v0.10.7 (slightly modified) to avoid having to depend on expss. See expss::apply_labels() for more documentation. Note that this version is not compatible with data.table.

Usage

apply_labels(data, ..., warn_missing = FALSE)

Value

An object of the same type as data, with labels

Arguments

data

data.frame/list

...

named arguments

warn_missing

if TRUE, throw a warning if some names are missing

Author

Dan Chaltiel

Examples

Run this code
iris %>%
  apply_labels(Sepal.Length="Length of Sepal",
               Sepal.Width="Width of Sepal") %>%
  crosstable()

Run the code above in your browser using DataLab