getPlantNames | R Documentation |
Translates between Latin names, common names and TSN numbers.
getPlantNames(
object,
names,
out.style = "common",
in.style = "Latin",
output = "vector"
)
object |
An |
names |
a character vector of Latin names, common names or TSN numbers (as a character vector) to be translated, or when list of
|
out.style |
Either "common", "Latin", or "TSN". Indicates the type of name that should be returned. Defaults to "common" |
in.style |
Either "common", "Latin", or "TSN". Indicates the type of name found in the "names" argument. |
output |
Accepts "vector" or "list". Determines the output type When |
This function will convert the names in names
to the style specified in out.style
,
using the data in the Commons
slot of an object of class NPSForVeg
. Note that if the data in the Commons
slot
has more than one entry for one or more of the input names, or is not present, the funciton will fail with an error.
If the object
is a list, then the names
can be a list as well. If so then then each element in the list of objects will
be matched with the corresponding element in the list of names, and getPlantNames
will be run. When output
is "vector" the
resuting character vectors will be concatenated using unlist
. When output
is "list" the the output will be a list with each
element being a character vector of names.
The function will not accept a list of names when the object
is a data.frame or an NPSForVeg
object.
A character vector or list of names in the format specified by out.style
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.