Learn R Programming

compstatr (version 0.2.1)

cs_replace0: 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

Run this code
# NOT RUN {
# 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)

# }

Run the code above in your browser using DataLab