Skip to contents

Relabel a subset of the variables

Usage

var_relabel(x, ...)

Arguments

x

a data.frame object

...

name-value pairs, where name corresponds to a variable name in x and the value to the new variable label

Value

a copy of x with changed labels according to ...

Examples

x <- var_relabel(iris, Sepal.Length = "Sepal Length of iris flower")
var_labels(x)
#>                  Sepal.Length                   Sepal.Width 
#> "Sepal Length of iris flower"                            NA 
#>                  Petal.Length                   Petal.Width 
#>                            NA                            NA 
#>                       Species 
#>                            NA