Revision 4d37ecce6b3f6a5469d23eeba965d7de2f5ca70f authored by Björn Böttcher on 13 September 2018, 14:20:06 UTC, committed by cran-robot on 13 September 2018, 14:20:06 UTC
1 parent 441d15d
sample.cols.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariance-functions.R
\name{sample.cols}
\alias{sample.cols}
\title{resample the columns of a matrix}
\usage{
sample.cols(x, vec = 1:ncol(x), replace = TRUE)
}
\arguments{
\item{x}{matrix}
\item{vec}{vector, indicates which columns belong together}
\item{replace}{boolean, sampling with or without replacement}
}
\value{
Returns a matrix with the same dimensions as \code{x}. The columns are resampled from the original columns. The resampling is done with replacement (\code{replace = TRUE}) or without (\code{replace = FALSE}). Columns which belong together (indicated by vec) are resampled identically, i.e., all values in rows of these are kept together.
}
\description{
resample the columns of a matrix
}
\examples{
sample.cols(matrix(1:15,nrow = 5),vec = c(1,1,2))
}
Computing file changes ...