Infer the notation from one row or column label
infer_notation_for_one_label.Rd
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 This function might not work as expected if
notation
is not a list. Ifnotation
is not a list,notations
is returned in full. Default isRCLabels::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
. IfTRUE
, the return value is a named list. If only one ofnotations
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
matchesx
. Default isTRUE
.- 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 inx
. WhenFALSE
, an unsuccessful label inference will returnNULL
.