Element-wise bitwise NOT – a logical negation on a boolean input, and a
bit-by-bit complement on an integer, so nv_not(12L) is -13. You can also
use the ! operator, which expects bool inputs.
Arguments
- x
(
arrayish)
One input. Can be any integerish data type. An R value materializes at its default data type.
Value
(arrayish)
Has the input's shape and data type.
The ! operator
! is logical, like in base R.
Unlike base R it only accepts booleans and does not auto-convert non-booleans by comparing them with 0.
See also
prim_not() for the underlying primitive.