fix_names | R Documentation |
That is, this function attempts to take all the names that are synonyms, for whatever reason (e.g., some names have authorities on them), and collapses them to the same string - making data easier to deal with for making maps, etc. OR - you can think of this as a tool for
fix_names(x, how = "shortest", replace = NULL)
x |
(data.frame) A data.frame. the target taxonomic name column should be 'name' |
how |
One of a few different methods:
|
replace |
A data.frame of names to replace names in the occurrence
data.frames with. Only used if how="supplied". The data.frame should have
two columns: the first is the names to match in the input |
a data.frame
## Not run: df <- sample_data_7 # method: shortest fix_names(df, how="shortest")$name # method: supplied (replace_df <- data.frame( one = unique(df$name), two = c('P. contorta', 'P.c. var. contorta', 'P.c. subsp bolanderi', 'P.c. var. murrayana'), stringsAsFactors = FALSE)) fix_names(df, how="supplied", replace = replace_df)$name ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.