Learn R Programming

rapportools (version 1.2)

label<-: Set Variable Label

Description

This function sets a label to a variable, by storing a character string to its label attribute.

Usage

label(var) <- value

Arguments

var

a variable (see is.variable for details)

value

a character value that is to be set as variable label

See Also

label

Examples

Run this code
if (FALSE) {
label(mtcars$mpg) <- "fuel consumption"
x <- rnorm(100)
(label(x) <- "pseudo-random normal variable")
}

Run the code above in your browser using DataLab