Learn R Programming

contrastable (version 1.0.2)

is_orthogonal: Check for orthogonality

Description

Given a contrast matrix or list of contrast matrices (eg from enlist_contrasts() ), return a logical vector of whether each contrast is orthogonal or not.

Usage

is_orthogonal(contrast_matrices, USE.NAMES = FALSE)

Value

Logical vector, will retain names of a passed list

Arguments

contrast_matrices

Contrast matrix or list of contrast matrices

USE.NAMES

Logical, whether vector should be named

Examples

Run this code

is_orthogonal(treatment_code(5)) # FALSE
is_orthogonal(helmert_code(5)) # TRUE

Run the code above in your browser using DataLab