Learn R Programming

IRCcheck (version 1.0.0)

symm_mat: Symmetric Matrix

Copy the upper triangular of a matrix into the lower triangular portion of the matrix.

Description

Symmetric Matrix

Copy the upper triangular of a matrix into the lower triangular portion of the matrix.

Usage

symm_mat(x)

Arguments

x

A matrix of dimensions p by p.

Value

A matrix

Examples

Run this code
# NOT RUN {
adj <- matrix(sample(0:1, size = 25, replace = TRUE), 5, 5)
symm_mat(adj)

# }

Run the code above in your browser using DataLab