Learn R Programming

causaloptim (version 0.9.8)

parse_constraints: Parse text that defines a the constraints

Description

Parse text that defines a the constraints

Usage

parse_constraints(constraints, obsnames)

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).

Arguments

constraints

A list of character strings

obsnames

Vector of names of the observed variables in the graph

Examples

Run this code
constrainttext <- "X(Z = 1) >= X(Z = 0)"
obsnames <- c("Z", "X", "Y")
parse_constraints(constraints = constrainttext, obsnames = obsnames)

Run the code above in your browser using DataLab