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

~ RObject -- bitwise NOT of an R object, or create a one-sided formula

Description

For integer and real R vectors, ~ computes bitwise NOT, calling R's bitwNot.

i1 : x = RObject 12

o1 = [1] 12

o1 : RObject of type integer
i2 : ~x

o2 = [1] -13

o2 : RObject of type integer

For all other types, ~ creates a one-sided R formula, equivalent to R's ~x. This is the same operator used for two-sided formulas; see RObject ~ RObject.

i3 : ~ RQuote "x"

o3 = .Primitive("~")(x)

o3 : RObject of type language

See also

Ways to use this method:

  • ~ RObject -- bitwise NOT of an R object, or create a one-sided formula

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