cc_equ {CoordinateCleaner} | R Documentation |
Identify Records with Identical lat/lon
Description
Removes or flags records with equal latitude and longitude coordinates, either exact or absolute. Equal coordinates can often indicate data entry errors.
Usage
cc_equ(
x,
lon = "decimalLongitude",
lat = "decimalLatitude",
test = "absolute",
value = "clean",
verbose = TRUE
)
Arguments
x |
data.frame. Containing geographical coordinates and species names. |
lon |
character string. The column with the longitude coordinates. Default = “decimalLongitude”. |
lat |
character string. The column with the latitude coordinates. Default = “decimalLatitude”. |
test |
character string. Defines if coordinates are compared exactly (“identical”) or on the absolute scale (i.e. -1 = 1, “absolute”). Default is to “absolute”. |
value |
character string. Defining the output value. See value. |
verbose |
logical. If TRUE reports the name of the test and the number of records flagged. |
Value
Depending on the ‘value’ argument, either a data.frame
containing the records considered correct by the test (“clean”) or a
logical vector (“flagged”), with TRUE = test passed and FALSE = test
failed/potentially problematic . Default = “clean”.
See Also
Other Coordinates:
cc_aohi()
,
cc_cap()
,
cc_cen()
,
cc_coun()
,
cc_dupl()
,
cc_gbif()
,
cc_inst()
,
cc_iucn()
,
cc_outl()
,
cc_sea()
,
cc_urb()
,
cc_val()
,
cc_zero()
Examples
x <- data.frame(species = letters[1:10],
decimalLongitude = runif(100, -180, 180),
decimalLatitude = runif(100, -90,90))
cc_equ(x)
cc_equ(x, value = "flagged")