Learn R Programming

LMMELSM (version 0.2.0)

.full_to_lower_tri: Get indices for subsetting lower-tri summaries of square matrices.

Description

Helper for correlation-matrix summarize output.

Usage

.full_to_lower_tri(x, string = FALSE)

Value

Charactor vector (if string is TRUE) or integer vector.

Arguments

x

Integer. Dimension of matrix.

string

Logical (Default: FALSE). Whether to return strings (e.g., [2,1], or row indices, assuming column-major ordering.)

Author

Stephen R. Martin

Details

The .summarize function returns every redundant and constant element from a correlation matrix. This function returns the stan-strings (when string = TRUE, e.g., [2,1], [3,1]), or the row-index assuming column-major order.