Learn R Programming

spinifex (version 0.1.0)

view_manip_space: Plot projection frame and return the axes table.

Description

Uses base graphics to plot the circle with axes representing the projection frame. Returns the corresponding table.

Usage

view_manip_space(basis, manip_var, manip_col = "blue", theta = pi *
  5/12, z_col = "red", labels = paste0("V", 1:nrow(basis)))

Arguments

basis

A (p, d) basis, XY linear combination of each dimension (numeric variable).

manip_var

Number of the column/dimension to rotate.

manip_col

String of the color to highlight the manip_var.

theta

Angle in radians to rotate the manip space. Defaults to pi * 5/12.

z_col

Color to illustrate the z direction or out of the projection plane.

labels

Optional, character vector of p length, add name to the axes in the reference frame, typically the variable names.

Value

ggplot object of the basis.

Examples

Run this code
# NOT RUN {
flea_std <- tourr::rescale(tourr::flea[, 1:6])
rb <- basis_random(ncol(flea_std), 2)

view_manip_space(basis = rb, manip_var = 4)
# }

Run the code above in your browser using DataLab