h_prepare_labels: Check That Labels Are Valid and Useful

View source: R/helpers_knitr.R

h_prepare_labelsR Documentation

Check That Labels Are Valid and Useful

Description

A vector of labels is valid and useful if it is of length 2, of type character and its values are distinct.

Usage

h_prepare_labels(x)

Arguments

x

(character)
The vector to be checked

Details

If x is a scalar, a second element is added, whose value is the value of the scalar with "s" appended. If x is "toxicity", the plural is handled appropriately.

Value

a character vector of length 2 whose values are distinct


Roche/crmPack documentation built on June 30, 2024, 1:31 a.m.