negate | R Documentation |
Negates the binary number x. Negation x -> -x or -x -> x
negate(x)
x |
The number to be negated. A binary vector is expected. |
An »unsigned« number will be returned as »signed« regardless of whether the value is negative. No floating point supported.
The negated number of x. Returns a binary vector with signed=TRUE
switchEndianess or fillUpToByte.
summary(rdiversity:::negate(as.binary(5, signed=TRUE))) summary(rdiversity:::negate(as.binary(-5, signed=TRUE))) summary(rdiversity:::negate(as.binary(5, signed=FALSE)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.