mat_merge: mat_merge

View source: R/mat_merge.R

mat_mergeR Documentation

mat_merge

Description

Combines two matrices by drawing values from either below or above the diagonal and placing them below and above the diagonal.

Usage

mat_merge(
  x_mat,
  y_mat,
  x_from = "lower",
  y_from = "lower",
  x_to = "lower",
  y_to = "upper",
  diagonal = 0
)

Arguments

x_mat

a matrix.

y_mat

a second matrix.

x_from

if "lower" values are drawn from below the diagonal of x_mat. If "upper" values are drawn from above the diagonal of x_mat.

y_from

if "lower" values are drawn from below the diagonal of y_mat. If "upper" values are drawn from above the diagonal of y_mat.

x_to

if "lower" values from x_mat are placed below the diagonal. If "upper" values from x_mat are placed above the diagonal.

y_to

if "lower" values from y_mat are placed below the diagonal. If "upper" values from y_mat are placed above the diagonal.

diagonal

the value used to fill the diagonal. Defaults to 0.


camkay/panoply documentation built on Jan. 17, 2025, 6:31 a.m.