Skip to contents

Computes a dimensional reduction (rotation) from a matrix of points such that the first dimension of the projected space passes through the means of two groups in the original space. Subsequent dimensions are computed using SVD on the deflated data.

Usage

ona.rotate.by.mean(x, groups, codes)

Arguments

x

A matrix or data frame of ENA points to be rotated (typically centered and normalized).

groups

A list of length 2, each element being a logical or character vector indicating membership in one of the two groups whose means define the first dimension. If character, should match unit labels in x.

codes

Character vector of code names corresponding to columns of x (used for labeling the rotation matrix).

Value

An ENARotationSet object containing the rotation matrix and associated metadata.