% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ComDim-classes.R
\name{variableNames}
\alias{variableNames}
\alias{variableNames,MultiBlock-method}
\title{variableNames}
\usage{
variableNames(x, ...)

\S4method{variableNames}{MultiBlock}(x, block)
}
\arguments{
\item{x}{A MultiBlock object.}

\item{...}{Not used. Present for S4 generic dispatch compatibility.}

\item{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.}
}
\value{
A named list of variable-name vectors (all blocks), or a single
  vector when exactly one block is requested.
}
\description{
Return the variable names of a MultiBlock object.
}
\examples{
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)
}
