cs_replace0: Replace Coordinates with 0 Value with NA

Description Usage Arguments Value Examples

View source: R/spatial.R

Description

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

Usage

1
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

1
2
3
4
5
6
# 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)

compstatr documentation built on July 8, 2020, 7:34 p.m.