Not: Logical NOT

NotR Documentation

Logical NOT

Description

Returns 1 - x, flipping 0 to 1 and 1 to 0. Can also be written with the ! operator: !x.

Usage

Not(x, id = NULL)

Arguments

x

A boolean Variable or logic expression.

id

Optional integer ID (internal use).

Value

A Not expression.

See Also

And(), Or(), Xor(), implies(), iff()

Examples

## Not run: 
x <- Variable(boolean = TRUE)
not_x <- !x          # operator syntax
not_x <- Not(x)      # functional syntax

## End(Not run)

CVXR documentation built on March 6, 2026, 9:10 a.m.