Learn R Programming

editrules (version 2.2-0)

listViolatedEdits: Lists which rows of data.frame dat violate which constraints

Description

This function can be used as an input for automatic corrections methods.

Usage

listViolatedEdits(E, dat)

Arguments

Value

a list with per row a integer vector of the constraints that are violated

See Also

violatedEdits checkRows

Examples

Run this code
# Using character vector to define contraints
E <- editmatrix(editrules=c("x+3*y==2*z", "x==z"))
print(E)

dat <- data.frame( x = c(0,2,1)
                 , y = c(0,0,1)
                 , z = c(0,1,1)
                 )
# valid rows?
valid <- checkRows(E, dat)
invalid <- dat[!valid,] 
listViolatedEdits(E,invalid)

Run the code above in your browser using DataLab