Description Usage Arguments Value Examples
View source: R/statistic_functions.R
Get the label of variables witch were labelised thanks the setLabel function
1 | getVarLabel(data, variable = colnames(data))
|
data |
a data.frame containing colname to get variable label |
variable |
a character vector, containing the colnames to querry |
a named vector of the label of each variable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(mtcars)
label <- data.frame(VARIABLE = colnames(mtcars),
LABEL = c("Miles/(US) gallon",
"Number of cylinders",
"Displacement (cu.in.)",
"Gross horsepower",
"Rear axle ratio",
"Weight (1000 lbs)",
"1/4 mile time",
"Engine (0 = V-shaped, 1 = straight)",
"Transmission (0 = automatic, 1 = manual)",
"Number of forward gears",
"Number of carburetors"),
stringsAsFactors = FALSE)
labeled_df <- setLabelToVariable(mtcars, label)
getVarLabel(labeled_df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.