cs_missingXY compares X and Y coordinates and adds a logical column that identifies observations that are missing coordinate data.

cs_missingXY(.data, varX, varY, newVar)

Arguments

.data

A tibble or data frame

varX

Name of column containing x coordinate data

varY

Name of column containing y coordinate data

newVar

Name of new column that is TRUE if coordinate data are missing and FALSE otherwise.

Value

A tibble or data frame with a logical vector appended to it.

Examples

# load example data testData <- january2018 # identify missing x and y coordinates testData <- cs_missingXY(testData, varX = x_coord, varY = y_coord, newVar = missingXY)