Learn R Programming

fMRItools (version 0.7.2)

cor_mat: Un-vectorize correlation matrix

Description

Converted a vectorized upper triangular correlation matrix back to its full matrix form.

Usage

cor_mat(
  x_diag,
  diag_val = NA,
  names = NULL,
  newOrder = NULL,
  lowerOnly = FALSE
)

Value

A square correlation matrix

Arguments

x_diag

The vectorized upper triangular correlation matrix.

diag_val

The value to put on the diagonals of the correlation matrix. Default: NA.

names

(Optional) row/column names.

newOrder

(Optional) new index order.

lowerOnly

Set the upper triangle to NA? Default: FALSE.