This function a specified column from the data frame and replaces cells that have the value 0 with NA

cs_replace0(.data, var)

Arguments

.data

A tibble or data frame

var

Name of column containing coordinate data

Value

A tibble or data frame with the coordinate column updated.

Examples

# load example data testData <- january2018 # replace 0s in the x and y coordinate variables testData <- cs_replace0(testData, var = x_coord) testData <- cs_replace0(testData, var = y_coord)