infer_notation_for_one_label: Infer the notation from one row or column label

View source: R/notation.R

infer_notation_for_one_labelR Documentation

Infer the notation from one row or column label

Description

This is a non-public helper function for vectorized infer_notation().

Usage

infer_notation_for_one_label(
  x,
  inf_notation = TRUE,
  notations = RCLabels::notations_list,
  allow_multiple = FALSE,
  retain_names = FALSE,
  choose_most_specific = TRUE,
  must_succeed = TRUE
)

Arguments

x

A single row or column label.

inf_notation

A boolean that tells whether to infer notation for x.

notations

A list of notations from which matches will be inferred Default is RCLabels::notations_list.

allow_multiple

A boolean that tells whether multiple notation matches are allowed. If FALSE (the default), multiple matches give an error.

retain_names

A boolean that tells whether to retain names on the outgoing matches. Default is FALSE. If TRUE, the return value is a named list. If only one of notations is returned, names are never supplied.

choose_most_specific

A boolean that indicates if the most-specific notation will be returned when more than one of notations matches x. Default is TRUE.

must_succeed

A boolean that if TRUE (the default), causes an error to be thrown if a matching notation is not found for any label in x. When FALSE, an unsuccessful label inference will return NULL.

Value

A single matching notation object (if allow_multiple = FALSE, the default) or possibly multiple matching notation objects (if allow_multiple = TRUE). If no notations match x, NULL.


RCLabels documentation built on April 25, 2023, 5:11 p.m.