The correct_class() function corrects the classes of each column in a data frame of your queried species.
This function requires no additional packages.
correct_class(
df,
scientific.name = "scientificName",
genus = "genus",
species = "specificEpithet",
infraspecific.epithet = "infraspecificEpithet",
id = "ID",
occ.id = "occurrenceID",
basis.of.record = "basisOfRecord",
event.date = "eventDate",
year = "year",
month = "month",
day = "day",
inst.code = "institutionCode",
recorded.by = "recordedBy",
country = "country",
county = "county",
state = "stateProvince",
locality = "locality",
latitude = "latitude",
longitude = "longitude",
coord.uncertainty = "coordinateUncertaintyInMeters",
info.withheld = "informationWithheld",
habitat = "habitat",
aggregator = "aggregator"
)Returns data frame with corrected classes of each column.
Data frame returned by gator_download().
Default = "scientificName". The name of the scientific name column in the data frame.
Default = "genus". The name of the genus column in the data frame.
Default = "specificEpithet". The name of the specific epithet column in the data frame.
Default = "infraspecificEpithet". The name of the infraspecific epithet column in the data frame.
Default = "ID". The name of the id column in the data frame, which contains unique IDs defined from GBIF or iDigBio.
Default = "occurrenceId". The name of the occurrence ID column in the data frame.
Default = "basisOfRecord". The name of the basis of record column in the data frame.
Default = "eventDate". The name of the event date column in the data frame.
Default = "year". The name of the event date year column in the data frame.
Default = "month". The name of the event date month column in the data frame.
Default = "day". The name of the event date day column in the data frame.
Default = "institutionCode". The name of the collection code column in the data frame.
Default = "recordedBy". The name of the collector name column in the data frame.
Default = "country". The name of the country column in the data frame.
Default = "county". The name of the county column in the data frame.
Default = "stateProvince". The name of the state/province column in the data frame.
Default = "locality". The name of the locality column in the data frame.
Default = "latitude". The name of the latitude column in the data frame.
Default = "longitude". The name of the longitude column in the data frame.
Default = "coordinateUncertaintyInMeters". The name of the coordinate uncertainty column in the data frame.
Default = "informationWithheld". The name of the information withheld column in the data frame.
Default = "habitat". The name of the habitat column in the data frame.
Default = "aggregator". The name of the column in the data frame that identifies the aggregator that provided the record.
"aggregator", "infraspecific.epithet", and "recorded.by" columns will be skipped if they do not exist. This function requires the dplyr package.