get_labs_att {labelr}R Documentation

Return Specified Label Attribute, if Present

Description

get_labs_att returns the specified piece of labelr lab(el) attribute meta- data information if it is present.

Usage

get_labs_att(data, att)

Arguments

data

the data.frame you are checking for the presence (or absence) of labelr meta-data.

att

the specific label meta-data you are looking for. Default of NULL will return any and all meta-data with name substring "name.labs", "val.labs", or "factor." (period is part of the substring).

Value

A list.

Examples

# make toy demographic (gender, raceth, etc.) data set
set.seed(555)
df <- make_demo_data(n = 1000) # another labelr:: function
# let's add variable VALUE labels for variable "raceth"
df <- add_val_labs(df,
  vars = "raceth", vals = c(1:7),
  labs = c("White", "Black", "Hispanic", "Asian", "AIAN", "Multi", "Other"),
  max.unique.vals = 50
)


[Package labelr version 0.1.5 Index]