% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FilterSamplesMultiBlock.R
\name{FilterSamplesMultiBlock}
\alias{FilterSamplesMultiBlock}
\title{FilterSamplesMultiBlock}
\usage{
FilterSamplesMultiBlock(MB, samples = sampleNames(MB))
}
\arguments{
\item{MB}{A MultiBlock object.}

\item{samples}{A vector of sample names to keep. Names not found in the
MultiBlock are silently ignored; the order of the retained samples
follows the order given here.}
}
\value{
The MultiBlock object restricted to the requested samples. The \code{Batch} and
  \code{Metadata} slots are also subsetted and reordered to match.
}
\description{
Retain a subset of samples in a MultiBlock object.
}
\examples{
b1 <- matrix(rnorm(500), 10, 50)
b2 <- matrix(rnorm(800), 10, 80)
rownames(b1) <- rownames(b2) <- paste0("sample_", 1:10)
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
mb <- FilterSamplesMultiBlock(mb, samples = paste0("sample_", 1:5))
}
\seealso{
\code{\link{MultiBlock}}, \code{\link{AddMetadata}}, \code{\link{ProcessMultiBlock}}
}
