| variableNames | R Documentation |
Return the variable names of a MultiBlock object.
variableNames(x, ...)
## S4 method for signature 'MultiBlock'
variableNames(x, block)
x |
A MultiBlock object. |
... |
Not used. Present for S4 generic dispatch compatibility. |
block |
Optional. A vector of block names or indices to retrieve. When omitted, variable names for all blocks are returned as a named list. When a single block is specified, a plain vector is returned. |
A named list of variable-name vectors (all blocks), or a single vector when exactly one block is requested.
b1 <- matrix(rnorm(500), 10, 50)
b2 <- matrix(rnorm(800), 10, 80)
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
variableNames(mb) # named list: b1 = 1:50, b2 = 1:80
variableNames(mb, "b1") # 1:50
variableNames(mb, 1:2) # same as variableNames(mb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.