Learn R Programming

SetMethods (version 4.0)

intersectExp: Intersects two boolean expressions.

Description

Function that intersects two boolean expressions.

Usage

intersectExp(expression1, expression2)

Value

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

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 "*".

Author

Ioana-Elena Oana

Examples

Run this code
intersectExp("~EMP*MA", "MA+~STOCK*OCCUP")
intersectExp("~A*B + C*~D","A*B+~D")

Run the code above in your browser using DataLab