| Ops.mcnode | R Documentation |
Alters the way operations are performed on ‘mcnode’ objects for better consistency.
This method is used for any of the Group Ops functions.
## S3 method for class 'mcnode'
Ops(e1, e2)
e1 |
an ‘mcnode’ object, a vector or an array. |
e2 |
an optional ‘mcnode’ object, a vector or an array. |
Rules (illustrated with ‘+’, ignoring the ‘nvariates’ dimension):
‘0 + 0 = 0’; ‘0 + V = V’; ‘0 + U = U’; ‘0 + VU = VU’
‘V + V = V’: if both of the same ‘(nsv)’ dimension
‘V + U = VU’: U recycled "by row", V recycled "by column"
‘V + VU = VU’: V recycled "by column"
‘U + U = U’: if both of the same ‘(nsu)’ dimension
‘U + VU = VU’: U recycled "by row"
‘VU + VU = VU’: if dimensions are ‘(nsu x nsv)’
The ‘outm’ attribute is transferred as: ‘each + each = each’; ‘none + other = other’; ‘other1 + other2 = other1’.
the result as a ‘mcnode’ object.
mcdata, mcstoc
oldvar <- ndvar()
oldunc <- ndunc()
ndvar(30)
ndunc(20)
x0 <- mcdata(3, type="0")
xV <- mcdata(1:ndvar(), type="V")
xU <- mcdata(1:ndunc(), type="U")
xVU <- mcdata(1:(ndunc()*ndvar()), type="VU")
-x0
x0 + 3
xV * x0
xV + xU
xU + xVU
ndvar(oldvar)
ndunc(oldunc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.