get_nouns: Extract nouns from labels

View source: R/extractors.R

get_nounsR Documentation

Extract nouns from labels

Description

Nouns are the first part of a row-column label, "a" in "a [b]". Internally, this function calls get_pref_suff() and asks for the prefix.

Usage

get_nouns(labels, notation = RCLabels::bracket_notation)

Arguments

labels

A list or vector of labels from which nouns are to be extracted.

notation

The notation type to be used when extracting nouns. Default is RCLabels::bracket_notation.

Value

A list of nouns from row and column labels.

Examples

get_nouns("a [b]", bracket_notation)
# Also works with vectors and lists.
get_nouns(c("a [b]", "c [d]"))
get_nouns(list("a [b]", "c [d]"))

RCLabels documentation built on March 18, 2022, 7:19 p.m.