get_piece | R Documentation |
This is a wrapper function for get_pref_suff()
, get_nouns()
, and
get_objects()
.
It returns a piece
of a row or column label.
get_piece( labels, piece = "all", notation = RCLabels::bracket_notation, prepositions = RCLabels::prepositions )
labels |
The row and column labels from which prepositional phrases are to be extracted. |
piece |
The name of the item to return. |
notation |
The notation object that describes the labels.
Default is |
prepositions |
A vector of strings to be treated as prepositions.
Note that a space is appended to each word internally,
so, e.g., "to" becomes "to ".
Default is |
piece
is typically one of
"all" (which returns labels
directly),
"pref" (for the prefixes),
"suff" (for the suffixes),
"noun" (returns the noun),
"pps" (prepositional phrases, returns prepositional phrases in full),
"prepositions" (returns a list of prepositions),
"objects" (returns a list of objects with prepositions as names), or
a preposition in prepositions
(as a string), which will return
the object of that preposition named by the preposition itself.
piece
must be a character vector of length 1.
If a piece
is missing in a label, "" (empty string) is returned.
A piece
of labels
.
labs <- c("a [from b in c]", "d [of e in f]", "Export [of Coal from USA to MEX]") get_piece(labs, "pref") get_piece(labs, "suff") get_piece(labs, piece = "noun") get_piece(labs, piece = "pps") get_piece(labs, piece = "prepositions") get_piece(labs, piece = "objects") get_piece(labs, piece = "from") get_piece(labs, piece = "in") get_piece(labs, piece = "of") get_piece(labs, piece = "to")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.