extractvar: Utilities for multivariate nodes

View source: R/extractvar.R

extractvarR Documentation

Utilities for multivariate nodes

Description

⁠extractvar⁠’ extracts one variate from a multivariate node.

⁠addvar⁠’ adds consistent ‘⁠mcnode⁠’s to build a multivariate ‘⁠mcnode⁠’ .

Usage

extractvar(x, which=1)
addvar(...)

Arguments

x

a multivariates ‘⁠mcnode⁠’.

which

a vector. which variate(s) should be extracted?

...

⁠mcnode⁠’s to be gathered in a multivariate ‘⁠mcnode⁠’. These ‘⁠mcnode⁠’s should be of same type and dimension.

Details

The ‘⁠outm⁠’ attribute of the output of ‘⁠addvar⁠’ will be the one of the first element.

Value

The new built ‘⁠mcnode⁠’.

See Also

mcnode for ‘⁠mcnode⁠’ objects.

Examples

x <- mcdata(0:3, "0", nvariates = 4)
y <- extractvar(x, c(1, 3)) 
y
addvar(x, y)


mc2d documentation built on July 26, 2023, 6:07 p.m.