noSuchElements: Message on Missing Elements

View source: R/noSuchElements.R

noSuchElementsR Documentation

Message on Missing Elements

Description

Message on Missing Elements

Usage

noSuchElements(x, available, type = "element", sorted = TRUE, suffix = "")

Arguments

x

name of element that was not found

available

names of elements that are available

type

type of element to appear in the message. Default: "element"

sorted

logical. Whether or not to print the available elements in lexical order. Default: TRUE

suffix

suffix to be appended to type. Can be used to distinguish between singular and plural form. Default: ""

Examples

cat(kwb.utils:::noSuchElements("x", LETTERS[1:3]))
cat(kwb.utils:::noSuchElements(c("x", "y"), LETTERS[1:3], suffix = "s"))

KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.