% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table-pairwise_matrix.R
\name{pairwise_matrix}
\alias{pairwise_matrix}
\alias{corr_matrix}
\title{Display a Pairwise Matrix Table in the Console}
\usage{
pairwise_matrix(
  display,
  title = NULL,
  name = "Pairwise Matrix",
  diag_1 = TRUE,
  digits = 3,
  layout_view = FALSE,
  layout_center = FALSE,
  center_table = FALSE,
  border_char = getOption("tab_default")$border_char,
  style = list(),
  ...
)

corr_matrix(
  display,
  title = NULL,
  diag_1 = TRUE,
  digits = 3,
  layout_view = FALSE,
  layout_center = FALSE,
  center_table = FALSE,
  border_char = getOption("tab_default")$border_char,
  style = list(),
  ...
)
}
\arguments{
\item{display}{A \code{pairwise_spec} object from \code{new_pairwise_data()}, or a
plain symmetric matrix (e.g. from \code{cor()}).}

\item{title}{Label shown above the table. Auto-detected from a \code{title}
attribute on the spec if present; falls back to \code{name}.}

\item{name}{Short name used in the layout legend box header. Default
\code{"Pairwise Matrix"}.}

\item{diag_1}{If \code{TRUE}, diagonal cells always show \code{"1"}. Default \code{TRUE}.}

\item{digits}{Decimal places for numeric formatting. Default \code{3}.}

\item{layout_view}{Show a layout legend box above the table? Default \code{FALSE}.}

\item{layout_center}{Center the layout box in the terminal? Default \code{FALSE}.}

\item{center_table}{Center table in terminal? Default \code{FALSE}.}

\item{border_char}{Border character. Default from \code{getOption("tab_default")}.}

\item{style}{A style list. Keys match the extra field names passed to
\code{new_pairwise_data()} (e.g. \code{rho}, \code{pval}, \code{bf}), plus \code{title} and
\code{border_text}.}

\item{...}{Reserved for future use.}
}
\value{
Invisibly returns the rendered character matrix.
}
\description{
Display a Pairwise Matrix Table in the Console
}
\examples{
# From a plain correlation matrix
pairwise_matrix(cor(mtcars[, 1:4]), title = "Pearson Correlation Matrix")

# Customizable example
spec = new_pairwise_data(
    var1 = c("a", "a", "b"),
    var2 = c("b", "c", "c"),
    rho = c("0.89", "0.79", "0.66"),
    pval = c("<0.001", "<0.001", "<0.001")
)
pairwise_matrix(spec, title = "Pearson Correlation Matrix", layout_view = TRUE)

}
