Learn R Programming

SciencesPo (version 1.02.12)

labelvar: Labels variables

Description

Labels variables

Usage

labelvar(variable, label, data, replace = TRUE)

Arguments

variable
the variable to be labeled
label
the label, a short description text.
data
the data.frame where var is.
replace
is logical. If TRUE, replaces the original column with the new one with label.

encoding

UTF-8

Examples

Run this code
data(titanic)

info(titanic)

labelvar(CLASS, "4 categories for CLASS", data = titanic)

info(titanic)

Run the code above in your browser using DataLab