principal_angles: Metrics for subspaces

View source: R/metrics.R

principal_anglesR Documentation

Metrics for subspaces

Description

Calculate principal angles between subspace spanned by the columns of a and the subspace spanned by the columns of b

Usage

principal_angles(a, b)

Arguments

a

A matrix whose columns span a subspace.

b

A matrix whose columns span a subspace.

Value

a vector of principal angles (in radians)

Examples

a <- matrix(rnorm(9), 3, 3)
b <- matrix(rnorm(9), 3, 3)
principal_angles(a, b)

ccar3 documentation built on Sept. 16, 2025, 9:11 a.m.