| bc.d | R Documentation |
The bc.d() method
performs broadcasted decimal numeric operations on 2 numeric or logical arrays.
bc.d(x, y, op, ...)
## S4 method for signature 'ANY'
bc.d(x, y, op, tol = sqrt(.Machine$double.eps))
x, y |
conformable vectors/arrays of type logical or numeric. |
op |
a single string, giving the operator. |
... |
further arguments passed to or from methods. |
tol |
a single number between 0 and 0.1, giving the machine tolerance to use for the relational operators. |
For arithmetic operators:
A numeric array as a result of the broadcasted decimal arithmetic operation.
For relational operators:
A logical array as a result of the broadcasted decimal relational comparison.
broadcast_operators
x.dim <- c(4:2)
x.len <- prod(x.dim)
x.data <- sample(c(NA, 1.1:1000.1), x.len, TRUE)
x <- array(x.data, x.dim)
y <- array(1:50, c(4,1,1))
bc.d(x, y, "+")
bc.d(x, y, "-")
bc.d(x, y, "*")
bc.d(x, y, "/")
bc.d(x, y, "^")
bc.d(x, y, "==")
bc.d(x, y, "!=")
bc.d(x, y, "<")
bc.d(x, y, ">")
bc.d(x, y, "<=")
bc.d(x, y, ">=")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.