modify_nouns {RCLabels} | R Documentation |
Modify nouns in labels
Description
This function modifies the nouns of row and column labels.
The length of new_nouns
must be the same as the length of labels
.
Usage
modify_nouns(
labels,
new_nouns,
inf_notation = TRUE,
notation = RCLabels::notations_list,
choose_most_specific = FALSE
)
Arguments
labels |
The row and column labels in which the nouns will be modified. |
new_nouns |
The new nouns to be set in |
inf_notation |
A boolean that tells whether to infer notation for |
notation |
The notation type to be used when extracting prepositions.
Default is |
choose_most_specific |
A boolean that tells whether to choose the most specific
notation from |
Value
A character vector of same length as labels
with nouns modified to be new_nouns
.
Examples
labels <- c("a [of b in c]", "d [of e in USA]")
modify_nouns(labels, c("a_plus", "g"))