cs_filter_count: Remove Negative Counts

View source: R/filter.R

cs_filter_countR Documentation

Remove Negative Counts

Description

Removes the row that contains -1 in a specified column, indicating that the charge described in that observation has either been deemed unfounded or has been up-coded. For example, a victim of an aggravated assault dies, and the charge is changed to homicide.

Usage

cs_filter_count(.data, var)

Arguments

.data

A tibble or data frame

var

the name of the column

Value

A subset object with rows containing -1 removed

Examples

# load example data
testData <- january2018

# subset data to remove negative counts
testData <- cs_filter_count(testData, var = count)


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