get_attr: Extract attribute. Returns NA if none

View source: R/as_factor.R

get_attrR Documentation

Extract attribute. Returns NA if none

Description

Extract attribute. Returns NA if none

Usage

get_attr(data, attr = NULL)

Arguments

data

vector

attr

attribute name

Value

character vector

Examples

attr(mtcars$mpg, "label") <- "testing"
do.call(c, sapply(mtcars, get_attr))
## Not run: 
mtcars |>
  numchar2fct(numeric.threshold = 6) |>
  ds2dd_detailed()

## End(Not run)

REDCapCAST documentation built on April 4, 2025, 3:18 a.m.