Macaulay2 » Documentation
Packages » RInterface » RObject » RObject xor RObject
next | previous | forward | backward | up | index | toc

RObject xor RObject -- logical exclusive disjunction of R objects

Description

Compute the element-wise exclusive disjunction of two R logical vectors, calling R's xor.

i1 : RObject true xor RObject false

o1 = [1] TRUE

o1 : RObject of type logical
i2 : RObject true xor RObject true

o2 = [1] FALSE

o2 : RObject of type logical

When the inputs contain multiple elements, the output will also contain multiple elements.

i3 : RObject {true, true, false, false} xor RObject {true, false, true, false}

o3 = [1] FALSE  TRUE  TRUE FALSE

o3 : RObject of type logical

One of the operands may be a Macaulay2 object. It will be converted to an RObject before the operation is performed.

i4 : RObject {true, true, false, false} xor {true, false, true, false}

o4 = [1] FALSE  TRUE  TRUE FALSE

o4 : RObject of type logical

See also

Ways to use this method:

  • RObject xor RObject -- logical exclusive disjunction of R objects
  • RObject xor Thing
  • Thing xor RObject

The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/RInterface/doc/logical.m2:143:0.