Learn R Programming

spinifex (version 0.1.0)

manual_tour: Produce the series of projection bases to rotate a variable into and out of a projection

Description

Typically called by array2af(). An array of projections, the manual tour of the manip_var, which is rotated from phi's starting position to phi_max, to phi_min, and back to the start position.

Usage

manual_tour(basis = NULL, manip_var, theta = NULL, phi_min = 0,
  phi_max = 0.5 * pi, angle = 0.05)

Arguments

basis

A (p, d) dim orthonormal matrix. Required, no default.

manip_var

Integer column number or string exact column name of the. variable to manipulate. Required, no default.

theta

Angle in radians of "in-plane" rotation, on the XY plane of the reference frame. Defaults to theta of the basis for a radial manual tour.

phi_min

Minimum value phi should move to. Phi is angle in radians of the "out-of-plane" rotation, the z-axis of the reference frame. Required, defaults to 0.

phi_max

Maximum value phi should move to. Phi is angle in radians of the "out-of-plane" rotation, the z-axis of the reference frame. Required, defaults to pi/2.

angle

target distance (in radians) between bases.

Value

A (p, d, 4) history_array of the manual tour. The bases set for phi_start, phi_min, phi_max, and back to phi_start. To be called by tourr::interpolate().

Examples

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

rb <- basis_random(n = ncol(flea_std))
manual_tour(basis = rb, manip_var = 4)
# }

Run the code above in your browser using DataLab