ard_attributes {cards}R Documentation

ARD Attributes

Description

Add variable attributes to an ARD data frame.

Usage

ard_attributes(data, variables = everything(), label = NULL)

Arguments

data

(data.frame)
a data frame

variables

(tidy-select)
variables to include

label

(named list)
named list of variable labels, e.g. list(cyl = "No. Cylinders"). Default is NULL

Value

an ARD data frame of class 'card'

Examples

df <- dplyr::tibble(var1 = letters, var2 = LETTERS)
attr(df$var1, "label") <- "Lowercase Letters"

ard_attributes(df, variables = everything())

[Package cards version 0.1.0 Index]