fix_columns {gatoRs} | R Documentation |
Used in gators_download() - Fill out taxonomic name columns
Description
The fix_columns()
function fills out the taxonomic name columns based on available information in the data set.
For example, if a row has a name provided for the scientificName column, this information will be used
to generate the respective genus, specificEpithet, and infraspecificEpithet columns for that row.
Usage
fix_columns(
df,
scientific.name = "scientificName",
genus = "genus",
species = "specificEpithet",
infraspecific.epithet = "infraspecificEpithet"
)
Arguments
df |
Data frame of occurrence records. |
scientific.name |
Default = "scientificName". The name of the scientificName column in the data frame. |
genus |
Default = "genus". The name of the genus column in the data frame. |
species |
Default = "specificEpithet". The name of the specificEpithet column in the data frame. |
infraspecific.epithet |
Default = "infraspecificEpithet". The name of the infraspecificEpithet column in the data frame. |
Details
This function requires package stringr.
Value
Returns the original data frame with the specified columns.
Examples
fixed_data <- fix_columns(data)