Learn R Programming

repfun (version 0.1.2)

ru_labels: Assign labels to variables in a data frame

Description

Pass in a data frame along with a named list of columns with their corresponding labels.

Usage

ru_labels(dsetin, varlabels = list(), style = c("base", "Hmisc"))

Value

The incoming data frame with labels added.

Arguments

dsetin

Incoming data frame to have labels added to columns.

varlabels

List of variables and their labels.

style

Type of method used to add labels.

Examples

Run this code
library(repfun)
df_with_labels <- ru_labels(mtcars,varlabels=list(mpg='Miles per gallon',
                                                  cyl='Number of cylinders'))

Run the code above in your browser using DataLab