labels_or_names: Labels or names of list elements

View source: R/utils_rtables.R

labels_or_namesR Documentation

Labels or names of list elements

Description

Helper function for working with nested statistic function results which typically don't have labels but names that we can use.

Usage

labels_or_names(x)

Arguments

x

(list)
a list.

Value

A character vector with the labels or names for the list elements.

Examples

x <- data.frame(
  a = 1:10,
  b = rnorm(10)
)
labels_or_names(x)
var_labels(x) <- c(b = "Label for b", a = NA)
labels_or_names(x)


tern documentation built on June 20, 2025, 9:08 a.m.