simp_ineq {lazy.tree} | R Documentation |
Simplify the Conjunction of Inequalities
simp_ineq(ineq, debug = 0)
ineq |
a string containing a conjunction of inequalities |
print |
= 1 to print the result |
The inequality of the form aL < x aR
must precede the & sign as
simp_ineq("1 <= x < 5 & x <= 3")
.
It is assumed that the inequalities are valid.
Therefore, the order of the boundaries are not checked.
A list of
condc A string consisting of inequalities: the first term is the variable. condl A vector consisting of aR, op1, x, op2, aL
res <- simp_ineq("x >= 1 & x < 5")
res2 <- simp_ineq(paste(res$condc, "x < 3", sep=" & ") )
res3 <- simp_ineq(paste(res2$condc, "x > 2", sep=" & ") )
Print(res,res2,res3)