eigen.summary: Summarize Eigenvalues and Eigenvectors of a Covariance Matrix

View source: R/eigen.summary.R

eigen.summaryR Documentation

Summarize Eigenvalues and Eigenvectors of a Covariance Matrix

Description

This function computes the eigenvalues and eigenvectors of a given covariance matrix, ensures sign consistency in the eigenvectors, and outputs a formatted LaTeX table displaying the results.

Usage

eigen.summary(
  cov.matrix,
  caption = "Eigenvectors of Covariance Matrix",
  space_after_caption = "5mm"
)

Arguments

cov.matrix

A square numeric matrix representing the covariance matrix.

caption

A character string specifying the table caption (default: "Eigenvectors of Covariance Matrix").

space_after_caption

A character string specifying the space after the caption in LaTeX (default: "5mm").

Value

A LaTeX formatted table displaying the eigenvectors and eigenvalues.

Examples

cov_matrix <- matrix(c(4, 2, 2, 3), nrow = 2)
eigen.summary(cov_matrix)

snazzieR documentation built on April 3, 2025, 5:58 p.m.