# Creating the line by passing the coordinates of two points on the line:
rule01 <- pixel_rule("rule01", "g", "b",
list(c(0.35, 0.30), c(0.45, 0.10)),">")
# A vertical line as a rule; note that the equation will be simplified
rule02 <- pixel_rule("rule02", "g", "b",
list(c(0.35, 0.30), c(0.35, 0.00)), ">")
if (FALSE) {
# Creating the rule by passing an object of type rule_point:
rule_points01 <- place_rule("g", "b")
rule03 <- pixel_rule("rule03", "g", "b", rule_points01,">")
# Note that the creation of the intermediate object can be avoided:
rule04 <- pixel_rule("rule04", "g", "b", place_rule("g", "b"),">")
}
Run the code above in your browser using DataLab