Learn R Programming

SetMethods (version 2.4)

intersectExp: Intersects two boolean expressions.

Description

Function that intersects two boolean expressions.

Usage

intersectExp(expression1, expression2)

Arguments

expression1

A boolean expression. Conditions should be capitalized and negated conditions should be inserted with a "~". Unions of conditions are performed with a "+", while intersections are performed with a "*".

expression2

A boolean expression. Conditions should be capitalized and negated conditions should be inserted with a "~". Unions of conditions are performed with a "+", while intersections are performed with a "*".

Value

It returns the boolean expression representing the intersection of the two inputed expressions.

Examples

Run this code
# NOT RUN {
intersectExp("~EMP*MA", "MA+~STOCK*OCCUP")
intersectExp("~A*B + C*~D","A*B+~D")
# }

Run the code above in your browser using DataLab