The basic_locality_clean() function cleans locality by removing missing or impossible coordinates and correcting precision.
This function requires columns named 'latitude' and 'longitude'. These columns should be of type 'numeric'.
basic_locality_clean(
df,
latitude = "latitude",
longitude = "longitude",
remove.zero = TRUE,
precision = TRUE,
digits = 2,
remove.skewed = TRUE,
info.withheld = "informationWithheld"
)Return data frame with specimen removed that had missing or improper coordinate values.
Data frame of occurrence records returned from gators_download().
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 = TRUE. Indicates that points at (0.00, 0.00) should be removed.
Default = TRUE. Indicates that coordinates should be rounded to match the coordinate uncertainty.
Default = 2. Indicates digits to round coordinates to when precision = TRUE.
Default = TRUE. Utilizes the remove_skewed() function to remove skewed coordinate values.
Default = "informationWithheld". The name of the information withheld column in the data frame.
This function requires no additional packages.
cleaned_data <- basic_locality_clean(data)
Run the code above in your browser using DataLab