column_annotation_label {teal.modules.clinical}R Documentation

Get full label, useful for annotating plots

Description

Get full label, useful for annotating plots

Usage

column_annotation_label(dataset, column, omit_raw_name = FALSE)

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

Value

"Label ⁠[Column name]⁠" if label exists, otherwise "Column name".

Examples

data <- mtcars
column_annotation_label(data, "cyl")
attr(data[["cyl"]], "label") <- "Cylinder"
column_annotation_label(data, "cyl")
column_annotation_label(data, "cyl", omit_raw_name = TRUE)
column_annotation_label(tmc_ex_adsl, "ACTARM")

[Package teal.modules.clinical version 0.9.1 Index]