Learn R Programming

deducorrect (version 1.3.7)

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

Value

an ordered factor with levels mentioned under details

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.

Examples

Run this code

# create statusvector

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

# 
which(status < "valid")

Run the code above in your browser using DataLab