Last chance! 50% off unlimited learning
Sale ends in
Preference is given to labels specified in fmt_table1(..., var_label = list())
argument, then to a label attribute attached to the data frame
(i.e. attr(data$var, "label)), then to the variable name.
assign_var_label(data, variable, var_label)
Data frame.
Vector of column name.
list that includes specified variable labels,
e.g. var_label = list(age = "Age, yrs")
Vector variable labels.
# NOT RUN {
gtsummary:::assign_var_label(mtcars, names(mtcars), list(hp = "Horsepower"))
# }
Run the code above in your browser using DataLab