arithops {madness} | R Documentation |
Basic Arithmetic Operations.
Description
These perform basic arithmetic operations on madness
objects: unary
plus and minus, addition, subtraction, multiplication, division and power.
Usage
## S4 method for signature 'madness,missing'
e1 + e2
## S4 method for signature 'madness,missing'
e1 - e2
## S4 method for signature 'madness,madness'
e1 + e2
## S4 method for signature 'madness,numeric'
e1 + e2
## S4 method for signature 'madness,array'
e1 + e2
## S4 method for signature 'numeric,madness'
e1 + e2
## S4 method for signature 'array,madness'
e1 + e2
## S4 method for signature 'madness,madness'
e1 - e2
## S4 method for signature 'madness,numeric'
e1 - e2
## S4 method for signature 'madness,array'
e1 - e2
## S4 method for signature 'numeric,madness'
e1 - e2
## S4 method for signature 'array,madness'
e1 - e2
## S4 method for signature 'madness,madness'
e1 * e2
## S4 method for signature 'madness,numeric'
e1 * e2
## S4 method for signature 'madness,array'
e1 * e2
## S4 method for signature 'numeric,madness'
e1 * e2
## S4 method for signature 'array,madness'
e1 * e2
## S4 method for signature 'madness,madness'
e1 / e2
## S4 method for signature 'madness,numeric'
e1 / e2
## S4 method for signature 'madness,array'
e1 / e2
## S4 method for signature 'numeric,madness'
e1 / e2
## S4 method for signature 'array,madness'
e1 / e2
## S4 method for signature 'madness,madness'
e1 ^ e2
## S4 method for signature 'madness,numeric'
e1 ^ e2
## S4 method for signature 'madness,array'
e1 ^ e2
## S4 method for signature 'numeric,madness'
e1 ^ e2
## S4 method for signature 'array,madness'
e1 ^ e2
Arguments
e1 , e2 |
|
Author(s)
Steven E. Pav shabbychef@gmail.com
Examples
set.seed(123)
y <- array(rnorm(3*3),dim=c(3,3))
dy <- matrix(rnorm(length(y)*2),ncol=2)
dx <- crossprod(matrix(rnorm(ncol(dy)*100),nrow=100))
obj0 <- madness(val=y,vtag='y',xtag='x',dvdx=dy,varx=dx)
z <- array(rnorm(3*3),dim=c(3,3))
anobj <- + obj0
anobj <- - obj0
anobj <- 6 - obj0
anobj <- 1 + obj0
anobj <- obj0 - 3
anobj <- z + obj0
anobj <- obj0 - z
obj1 <- obj0 ^ 2
anobj <- (0.3 * obj0) + (5.1 * obj1)
anobj <- 2 ^ obj0
anobj <- obj1 ^ obj0
anobj <- obj1 / obj0
anobj <- z / obj0
[Package madness version 0.2.8 Index]