| bc.raw | R Documentation |
The bc.raw() function
performs broadcasted operations
on arrays of type raw, and the return type is always raw.
For bit-wise operations, use bc.bit.
For relational operations with logical (TRUE/FALSE/NA) results, use bc.rel.
bc.raw(x, y, op, ...)
## S4 method for signature 'ANY'
bc.raw(x, y, op)
x, y |
conformable raw vectors or arrays. |
op |
a single string, giving the operator. |
... |
further arguments passed to or from methods. |
bc.raw() always returns an array of type raw.
For the relational operators,
01 codes for TRUE results,
and 00 codes for FALSE results.
broadcast_operators
x <- array(
sample(as.raw(1:100)), c(5, 3, 2)
)
y <- array(
sample(as.raw(1:100)), c(5, 1, 1)
)
cond <- bc.raw(x, y, "!=")
print(cond)
bc_ifelse(cond, yes = x, no = y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.