add_label: Add label attribute to a vector.

Description Usage Arguments Value Examples

View source: R/add_label.R

Description

Add label attribute to a vector.

Usage

1
add_label(.x, .label)

Arguments

.x

A vector

.label

A character vector of length 1. Label of the vector.

Value

A labelled vector (i.e. a vector with label attribute)

Examples

1
2
3
4
5
6
7
## Not run: 
v <- 1:3
v <- add_label(v, "Some numbers")
v
attributes(v)

## End(Not run)

zawmtun/slingr documentation built on Dec. 23, 2021, 9:14 p.m.