foldMat: Fold a matrix

Description Usage Arguments Value Author(s)

View source: R/others__foldMat.R

Description

This function fold a matrix into different shape

Usage

1
foldMat(Mat, nfolds, byrow = TRUE)

Arguments

Mat

matrix

nfolds

number of folds

byrow

fold by row or by column.

Value

new matrix

Author(s)

Feng Li, Department of Statistics, Stockholm University, Sweden.


feng-li/flutils documentation built on Oct. 1, 2020, 9:09 p.m.