clean_count: Clean counts

View source: R/data-item-cleaning.R

clean_countR Documentation

Clean counts

Description

Replaces any values of all 9's with NA (if keep_unknown is TRUE) and converts the rest to integers.

Usage

clean_count(count, width, keep_unknown = FALSE)

Arguments

count

A character vector of counts (integer characters only).

width

Integer giving the character width of the field.

keep_unknown

Replace values for "unknown" with NA?

Value

Integer vector of count. If keep_unknown is FALSE, values representing unknown counts are replaced with NA.


naaccr documentation built on Sept. 20, 2024, 5:07 p.m.