Learn R Programming

dunlin (version 0.1.9)

attr_label: Setting the Label Attribute

Description

Setting the Label Attribute

Usage

attr_label(var, label)

Value

object with label attribute.

Arguments

var

(object) whose label attribute can be set.

label

(character) the label to add.

Examples

Run this code
x <- c(1:10)
attr(x, "label")

y <- attr_label(x, "my_label")
attr(y, "label")

Run the code above in your browser using DataLab