https://github.com/cran/deducorrect
Raw File
Tip revision: 01d2d9d945d974f05a9d7d7a56c2b7988364d30b authored by Mark van der Loo on 15 July 2015, 00:00:00 UTC
version 1.3.7
Tip revision: 01d2d9d
status.Rd
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/util.R
\name{status}
\alias{status}
\title{Create empty status vector}
\usage{
status(n, ini = NA)
}
\arguments{
\item{n}{length of status vector}

\item{ini}{initial value, defaults to \code{NA}}
}
\value{
an ordered factor with levels mentioned under details
}
\description{
Create empty status vector
}
\details{
Every function in \code{\link[=deducorrect-package]{deducorrect}} returns the status of every row after treatment.
The status vector is an \code{ordered} factor with levels

\tabular{ll}{
 \code{invalid}      \tab record is invalid but could not be corrected\cr
 \code{partial}    \tab record violates less edits then before entering the function\cr
 \code{corrected}    \tab record satisfies all edit restrictions after correction\cr
 \code{valid}        \tab record violates no edit restrictions\cr
}
where \code{invalid < partial < corrected < valid}



This function is \code{deducorrect} internal.
}
\examples{

# create statusvector

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

# 
which(status < "valid")
}

back to top