Assigns a label to a data frame column using Hmisc::label()

assign_label(df, col)

Arguments

df

a data frame

col

a column

Value

A dataframe with the new labels

Details

Fetches label from nsqipBileSpill::fetch_label().

In order to ascribe your own labels, you must update the nsqipBileSpill::fetch_label() function.

Examples

df <- data.frame(age = c(1,2,3)) df %>% assign_label(age)
#> age #> 1 1 #> 2 2 #> 3 3