Skip to contents

Sets or gets the dataset-level label attribute on a data frame.

Usage

set_dataset_label(data, label = NULL)

Arguments

data

A data frame.

label

A single character string. If NULL, returns the current dataset label.

Value

When setting: the data frame with updated dataset label. When getting (label = NULL): the current label string or NULL.

See also

Examples

df <- data.frame(X = 1)
df <- set_dataset_label(df, "Demographics")
set_dataset_label(df)
#> [1] "Demographics"