status {deducorrect}R Documentation

Create empty status vector

Description

Create empty status vector

Usage

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


# create statusvector

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

# 
which(status < "valid")

[Package deducorrect version 1.3.7 Index]