This is a wrapper function for
It returns a
piece of a row or column label.
get_piece( labels, piece = "all", notation = RCLabels::bracket_notation, prepositions = RCLabels::prepositions )
The row and column labels from which prepositional phrases are to be extracted.
The name of the item to return.
The notation object that describes the labels.
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 ".
piece is typically one of
"all" (which returns
"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.
piece is missing in a label, "" (empty string) is returned.
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.