expand: Expand a 2D matrix or matrix array by a factor of 'n'

View source: R/expand.R

expandR Documentation

Expand a 2D matrix or matrix array by a factor of 'n'

Description

Scale up 'expand' a matrix "x" by a scale factor of "n". Then return the expanded matrix. i.e.) if x is a 3x3 matrix and n = 3 return a 9x9 matrix where each entry in x is now equivalent to 9 values within the new 9x9 matrix.

Usage

expand(x, n = 3)

Arguments

x

A matrix or matrix array type object to be expanded

n

The scale factor, which the side lengths of the matrix will be increased by a factor of.


Will-McD/ENSTvisualise documentation built on June 24, 2022, 5:13 p.m.