Learn R Programming

spinifex (version 0.3.2)

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

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

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.

See Also

Other manual tour adjacent functions: interpolate_manual_tour(), manip_var_of(), manual_tour(), rotate_manip_space()

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab