Get full label, useful for annotating plots
Arguments
- dataset
data.frame
dataset- column
character
column to get label from- omit_raw_name
logical
omits the raw name in square brackets if label is found
Examples
data <- mtcars
column_annotation_label(data, "cyl")
#> [1] "cyl"
attr(data[["cyl"]], "label") <- "Cylinder"
column_annotation_label(data, "cyl")
#> [1] "Cylinder [cyl]"
column_annotation_label(data, "cyl", omit_raw_name = TRUE)
#> [1] "Cylinder"
if (FALSE) {
column_annotation_label(tmc_ex_adsl, "ACTARM")
}