cs_replace0: Replace Coordinates with 0 Value with NA

View source: R/spatial.R

cs_replace0R Documentation

Replace Coordinates with 0 Value with NA

Description

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

Usage

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)


chris-prener/compStatR documentation built on Jan. 25, 2024, 10:03 p.m.