Learn R Programming

SetMethods (version 2.4)

negateExp: Negates a boolean expression.

Description

Function that negates a boolean expression.

Usage

negateExp(expression)

Arguments

expression

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 a negated boolean expression.

Examples

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

Run the code above in your browser using DataLab