symmetrize_mats: Create a symmetric matrix

Description Usage Arguments Value Author(s) See Also

View source: R/create_mats.R

Description

symmetrize_mats will symmetrize a numeric matrix by assigning the off-diagonal elements values of either the max, min, or average of \{A(i, j), A(j, i)\}. The default is max because that is the default for graph_from_adjacency_matrix.

symmetrize_array is a convenience function which applies symmetrize_mats along the 3rd dimension of an array.

Usage

1
2
3
symmetrize_mats(A, symm.by = c("max", "min", "avg"))

symmetrize_array(A, ...)

Arguments

A

Numeric matrix

symm.by

Character string; how to create symmetric off-diagonal elements (default: max)

...

Arguments passed to symmetrize_mats

Value

Either a single symmetrized matrix, or an (3D) array

Author(s)

Christopher G. Watson, [email protected]

See Also

graph_from_adjacency_matrix

Other Matrix functions: apply_thresholds, cor.diff.test, create_mats


brainGraph documentation built on May 29, 2018, 9:03 a.m.