spread {extracat}R Documentation

Matrix Expansion

Description

Replaces each element of a matrix with a submatrix (containing this element) with a prespecified number of rows and columns.

Usage

spread(M, ncol = 1, nrow = 1)

Arguments

M The matrix to be expanded.
ncol The number of column repetitions.
nrow The number of row repetitions.

Value

A matrix.

Note

This function will be advanced in the future to support more than two dimensions.

Author(s)

Alexander Pilhoefer
Department for Computer Oriented Statistics and Data Analysis
University of Augsburg
Germany

References

Alexander Pilhoefer New approaches in visualization of categorical data: R-package extracat
Journal of Statistical Software, submitted Jan 2010

Examples

 M = matrix(1:12, ncol=4)
 spread(M, ncol = 5, nrow = 7)
 

[Package extracat version 1.0-0 Index]