View source: R/set_column_labels.R
set_column_labels | R Documentation |
Add label attribute using 'dplyr' syntax using the [Hmisc::label()]
set_column_labels(x, ...)
x |
The data frame that we want to label |
... |
Variable names with their intended label, e.g. 'mpg = "Miles per gallon"'. |
The original data.frame
Other Hmisc helpers:
set_column_units()
library(magrittr)
data(mtcars)
mtcars_with_labels <- mtcars %>%
set_column_labels(mpg = "Gas",
cyl = "Cylinders",
hp = "Strength")
Hmisc::label(mtcars_with_labels$mpg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.