Learn R Programming

⚠️There's a newer version (0.3.8) of this package.Take me there.

spinifex

Scope

Tours are a class of dynamic linear projection techniques that extend the viewing (of data-space) for numeric multivariate data as the dimensionality increases.

Description

Function that generate the path for manual tours. Tours are generally available in the tourr package. The grand tour is an algorithm that shows all possible projections given sufficient time. Guided uses projection pursuit to steer the tour towards interesting projections. The spinifex package implements manual control, where the contribution of a selected variable can be adjusted between -1 to 1, to examine the sensitivity of structure in the data to that variable. The result is an animation where the variable is toured into and out of the projection completely, which can be rendered using the 'gganimate' and 'plotly' packages.

Installation

You can install spinifex from CRAN:

install.packages("spinifex")

Or you can install the latest development version on github via remotes:

remotes::install_github("nspyrison/spinifex")

View the vignette to get started!

library("spinifiex")
vignette("spinifex")

reporting and issues

Please submit all bug reports, errors, and feature requests to https://github.com/nspyrison/spinifex/issues

Copy Link

Version

Install

install.packages('spinifex')

Monthly Downloads

274

Version

0.2.5

License

CC BY-NC-SA 4.0

Issues

Pull Requests

Stars

Forks

Maintainer

Nicholas Spyrison

Last Published

July 14th, 2020

Functions in spinifex (0.2.5)

pan_zoom

Pan (offset) and zoom (scale) a 2 column matrix, dataframe or scaler number.
breastcancer

Wisconsin Breast Cancer Database
oblique_frame

Plot a single frame of a manual tour
manual_tour

Produce the series of projection bases to rotate a variable into and out of a projection.
col_of

Return hex color code for a given discrete categorical variable.
is_orthonormal

Test if a numeric matrix is orthonormal.
pch_of

Return shape integers for a given discrete categorical variable.
oblique_basis

Return the basis of an oblique frame
array2df

Turns a tour path array into a long data frame.
create_manip_space

Create a manipulation space to rotate the manip variable in.
spinifex

spinifex
set_axes_position

Returns the axis scale and position.
view_basis

Plot the axes directions of the basis table without data points.
view_manip_space

Plot projection frame and return the axes table.
run_app

Runs a shiny app demonstrating manual tours
theme_spinifex

Aesthetic settings that can be applied to a ggplot object.
render_gganimate

Render the slides as a gganimate animation.
weather

Sample dataset of daily weather observations from Canberra airport in Australia.
render_

Prepate the ggplot object before passing to either animation package.
render_plotly

Render the slides as a plotly animation.
wine

The wine dataset from the UCI Machine Learning Repository.
play_manual_tour

Animate a manual tour
rotate_manip_space

Performs a rotation on the manipulation space of the given manip var.
play_tour_path

Render display of a provided tour path