Learn R Programming

dataset (version 0.3.1)

var_labels: Get / Set a variable labels in a dataset

Description

Get / Set a variable labels in a dataset

Usage

var_labels(x)

set_var_labels(x, value)

# S3 method for dataset var_labels(x)

# S3 method for dataset set_var_labels(x, value)

Arguments

x

A dataset object created with dataset::dataset.

value

A character vector for labelling the variables with set_var_labels.

Examples

Run this code
relabelled <- set_var_labels(
               iris_dataset,
                c(Sepal.Length="The sepal length measured in centimeters.",
                  Sepal.Width="The sepal width measured in centimeters.",
                  Species="The species of the iris observed.")
                 )
var_labels(relabelled)

Run the code above in your browser using DataLab