% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NormalizeMultiBlock.R
\name{NormalizeMultiBlock}
\alias{NormalizeMultiBlock}
\title{NormalizeMultiBlock}
\usage{
NormalizeMultiBlock(
  MB,
  blocks = NULL,
  method = c("none", "auto", "mean", "pareto", "norm", "geometric", "ranknorm")[5],
  infinite.as.NA = FALSE,
  constant = 0,
  offset = 3/8,
  showWarning = TRUE
)
}
\arguments{
\item{MB}{The MultiBlock object.}

\item{blocks}{Blocks to normalize. A vector of integers or block names
(optional; all blocks are processed when omitted).}

\item{method}{Normalization method. One of: \code{'none'} (no
transformation beyond optional Inf-to-NA conversion), \code{'auto'}
(auto-scaling), \code{'mean'} (mean-centering), \code{'pareto'}
(mean-centered and divided by the square root of the SD), \code{'norm'}
(mean-centered and divided by its Frobenius norm), \code{'geometric'}
(geometric mean scaling), \code{'ranknorm'} (rank-based inverse normal
transform). Default: \code{'norm'}.}

\item{infinite.as.NA}{If \code{TRUE}, Infinite values are converted to NA
before normalization. The presence of NA or Inf values will cause ComDim
to stop; use \code{\link{NAInfRemoveMultiBlock}} to handle them.}

\item{constant}{For \code{'geometric'}: value added to each element before
computing the geometric mean (useful when data contain zeros). Default: 0.}

\item{offset}{For \code{'ranknorm'}: offset in the Blom-type transform.
Default: 3/8 (Blom transform).}

\item{showWarning}{If \code{TRUE}, warn when all-NA variables are
discarded. Default: \code{TRUE}.}
}
\value{
The normalized MultiBlock object.
}
\description{
Normalize all blocks from a MultiBlock object. The ranknorm transform is
based on that from the RNOmni package (doi:10.1111/biom.13214).
}
\examples{
b1 <- matrix(rnorm(500), 10, 50)
b2 <- matrix(rnorm(800), 10, 80)
b2[c(2, 3, 5), c(1, 2, 3)] <- NA
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
mb <- NormalizeMultiBlock(mb, method = "auto")
}
