Learn R Programming

ggcorrheatmap (version 0.1.2)

shape_mat_long: Convert a matrix to long format using row names and column names.

Description

Convert a matrix to long format using row names and column names.

Usage

shape_mat_long(x, unique_pairs = FALSE, na_remove = FALSE)

Value

A data frame with the columns 'row', 'column' (indicating combinations), and 'value'

Arguments

x

Matrix to convert to long format.

unique_pairs

Whether only unique combinations should be included in the output (for symmetric matrices).

na_remove

Logical indicating if NAs should be excluded (removes NaNs too).