MAT_half: Get half of a matrix.

View source: R/matrices.R

MAT_halfR Documentation

Get half of a matrix.

Description

Returns a vector with the values in one half of the matrix. Which half and whether diagonal values are included can be specified.

Usage

MAT_half(x, lower = T, diag = F)

Arguments

x

A matrix or matrix-coercable object.

lower

Whether to extract the lower half. Defaults to T. If F, then the upper half is extracted.

diag

Whether the diagonal values should be included or not. Defaults to F.

Examples

cor(iris[-5]) #can't summarize this data due to diagonal
MAT_half(cor(iris[-5])) #this data we can

Deleetdk/kirkegaard documentation built on May 8, 2024, 12:27 a.m.