Parse text that defines a the constraints
Value
A data frame with columns indicating the variables being constrained, what the values of their parents are for the constraints, and the operator defining the constraint (equality or inequalities).
Examples
constrainttext <- "X(Z = 1) >= X(Z = 0)"
obsnames <- c("Z", "X", "Y")
parse_constraints(constraints = constrainttext, obsnames = obsnames)
#> leftout rightout operator leftcond rightcond
#> 1 X X >= Z=1 Z=0