% 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) <- value

\S4method{variableNames}{MultiBlock}(x) <- value
}
\arguments{
\item{x}{A MultiBlock object.}

\item{value}{A named list of variable-name vectors, one per block.}
}
\value{
The updated MultiBlock object.
}
\description{
Set the variable names of a MultiBlock object.
\code{value} must be a named list with one entry per block, where each
entry is a vector of variable names whose length matches the number of
columns in that block.
}
\details{
To update a single block, use standard list-replacement chaining:
\code{variableNames(mb)[["b1"]] <- newNames}
}
\examples{
b1 <- matrix(rnorm(500), 10, 50)
b2 <- matrix(rnorm(800), 10, 80)
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))

# Replace all at once:
variableNames(mb) <- list(
  b1 = paste0("v", 1:50),
  b2 = paste0("v", 1:80)
)

# Replace a single block using chaining:
variableNames(mb)[["b1"]] <- paste0("feat_", 1:50)
}
