Set variable labels of a data.frame

Description

Set variable labels of a data.frame

Usage

1

Arguments

df

data.frame

labels

character vector of variable names

Details

Set variable labels of a data.frame. They will be nicely visible with 'View()' in Rstudio.

Value

data.frame with labelled variables

Examples

1
2
cars2 <- set_variable_labels(cars,
  labels = c("Speed (mph)", "Stopping distance (ft)"))

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.