Learn R Programming

SetMethods (version 4.0)

negateExp: Negates a boolean expression.

Description

Function that negates a boolean expression.

Usage

negateExp(expression)

Value

It returns a negated boolean 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 "*".

Author

Ioana-Elena Oana

Examples

Run this code
negateExp("~EMP*MA")
negateExp("~A*B + C*~D")

Run the code above in your browser using DataLab