stackByColumn: Convert a Vector into a Matrix Filling Down Columns

View source: R/stackByColumn.R

stackByColumnR Documentation

Convert a Vector into a Matrix Filling Down Columns

Description

This is one of several related convenience functions designed to convert vectors into matrices or matrices into vectors, either by row or by column.

Usage

stackByColumn(IN, nrow, ncol)

Arguments

IN

An integer or numeric vector.

nrow

The number of rows in the final matrix.

ncol

The number of columns in the final matrix.

Details

This function is almost the same as matrix, with byrow = FALSE, and there are no dimnames or attributes in this function.

Value

A ncol x nrow matrix with no attributes

See Also

stackByRow, vectorizeByColumn, vectorizeByRow

Examples

stackByColumn(IN = 1:20, nrow = 5, ncol = 4)

bryanhanson/HandyStuff documentation built on July 22, 2022, 6:18 a.m.