status: Create empty status vector

Description Usage Arguments Details Value Examples

Description

Create empty status vector

Usage

1
status(n, ini = NA)

Arguments

n

length of status vector

ini

initial value, defaults to NA

Details

Every function in deducorrect returns the status of every row after treatment. The status vector is an ordered factor with levels

invalid record is invalid but could not be corrected
partial record violates less edits then before entering the function
corrected record satisfies all edit restrictions after correction
valid record violates no edit restrictions

where invalid < partial < corrected < valid

This function is deducorrect internal.

Value

an ordered factor with levels mentioned under details

Examples

1
2
3
4
5
6
7
# create statusvector

status <- deducorrect:::status(5)
status[1:5] <- c("invalid",NA,"corrected","valid","partial")

# 
which(status < "valid")

deducorrect documentation built on May 2, 2019, 3:47 p.m.