| extractvar | R Documentation |
‘extractvar’ extracts one or more variates from a multivariate ‘mcnode’. ‘addvar’ combines consistent ‘mcnode’s into a single multivariate ‘mcnode’.
extractvar(x, which = 1)
addvar(...)
x |
a multivariate ‘mcnode’. |
which |
a vector specifying which variate(s) to extract. |
... |
‘mcnode’s to be combined in a multivariate ‘mcnode’. These ‘mcnode’s should be of the same type and dimension. |
The ‘outm’ attribute of the output of ‘addvar’ is taken from the first element.
The new ‘mcnode’.
mcnode for ‘mcnode’ objects.
x <- mcdata(0:3, "0", nvariates = 4)
y <- extractvar(x, c(1, 3))
y
addvar(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.