arithmetic {kazaam} | R Documentation |
Some binary arithmetic operations for shaqs. All operations are vector-shaq or shaq-vector, but not shaq-shaq. See details section for more information.
## S4 method for signature 'shaq,shaq' e1 + e2 ## S4 method for signature 'shaq,numeric' e1 + e2 ## S4 method for signature 'numeric,shaq' e1 + e2 ## S4 method for signature 'shaq,shaq' e1 - e2 ## S4 method for signature 'shaq,numeric' e1 - e2 ## S4 method for signature 'numeric,shaq' e1 - e2 ## S4 method for signature 'shaq,shaq' e1 * e2 ## S4 method for signature 'shaq,numeric' e1 * e2 ## S4 method for signature 'numeric,shaq' e1 * e2 ## S4 method for signature 'shaq,shaq' e1 / e2 ## S4 method for signature 'shaq,numeric' e1 / e2 ## S4 method for signature 'numeric,shaq' e1 / e2 ## S4 method for signature 'shaq,shaq' e1 ^ e2 ## S4 method for signature 'shaq,numeric' e1 ^ e2
e1, e2 |
A shaq or a numeric vector. |
For binary operations involving two shaqs, they must be distributed identically.
A shaq.
Each operation is completely local.
## Not run: library(kazaam) x = ranshaq(runif, 10, 3) y = ranshaq(runif, 10, 3) x + y x / 2 y + 1 finalize() ## End(Not run)