create_manip_space: Create a manipulation space to rotate the manipulation...

Description Usage Arguments Value Examples

View source: R/1_manual_tour.r

Description

Typically called by manual_tour(). Creates a (p, d) orthonormal matrix, the manipulation space from the given basis right concatenated with a zero vector, with manip_var set to 1.

Usage

1
create_manip_space(basis, manip_var = manip_var_of(basis))

Arguments

basis

A (p, d) orthonormal numeric matrix, the linear combination the original variables contribute to projection frame. Required, no default.

manip_var

The number of the variable/column to rotate. Defaults to manip_var_of(basis), the variable with the largest contribution in the basis.

Value

A (p, d + 1) orthonormal matrix, the manipulation space to manipulate the projection in.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Setup
dat_std <- scale_sd(wine[, 2:6])
bas <- basis_pca(dat_std)
mv <- manip_var_of(bas)
create_manip_space(basis = bas, manip_var = mv)

## d = 1 case 
bas1d <- basis_pca(dat_std, d = 1)
mv <- manip_var_of(bas1d)
create_manip_space(bas1d, mv)

spinifex documentation built on Sept. 28, 2021, 5:09 p.m.