Learn R Programming

crosstable (version 0.3.2)

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)

Arguments

data

data.frame/list

...

named arguments

warn_missing

if TRUE, throw a warning if some names are missing

Value

An object of the same type as data, with labels

Examples

Run this code
# NOT RUN {
iris %>%
  apply_labels(Sepal.Length="Length of Sepal",
               Sepal.Width="Width of Sepal") %>% 
  crosstable()
# }

Run the code above in your browser using DataLab