label_variable {tinylabels}R Documentation

Label Variables Using Pipes

Description

label_variable() can be used to assign variable labels within a workflow using the tidyverse's pipe operator.

Usage

label_variable(x, ...)

label_variables(x, ...)

Arguments

x

Either a vector or a data.frame.

...

Variable label(s) to be assigned. For data frames, these have to be name-value pairs, see example.

Examples

  library(dplyr)
  test <- npk %>%
    label_variable(N = "Nitrogen", P = "Phosphate")
  variable_label(test)

[Package tinylabels version 0.2.4 Index]