with_same_dims {matricks}R Documentation

Create new matrix copying dimensions from the existing one

Description

Create new matrix copying dimensions from the existing one

Usage

with_same_dims(mat, data)

Arguments

mat

a matrix with desired dimensions

data

sigle numeric value or numeric vector

Value

a matrix

Examples

x <- matrix(7, 3, 6)
x
with_same_dims(x, 0)
with_same_dims(x, c(1, 2))

[Package matricks version 0.8.2 Index]