limn_tour {liminal}R Documentation

Tour a high dimensional dataset

Description

Tour a high dimensional dataset

Usage

limn_tour(
  tour_data,
  cols,
  color = NULL,
  tour_path = tourr::grand_tour(),
  rescale = clamp,
  morph = "center",
  gadget_mode = TRUE
)

Arguments

tour_data

a data.frame to tour

cols

Columns to tour. This can use a tidyselect specification such as tidyselect::starts_with().

color

A variable mapping to the color aesthetic, if NULL points will be colored black.

tour_path

the tour path to take, the default is tourr::grand_tour() but also works with tourr::guided_tour().

rescale

A function that rescales cols, the default is to clamp() the data to lie in the hyperdimensional unit cube. To not perform any scaling use identity().

morph

One of c("center", "centre", "identity", "radial") that rescales each projection along the tour path. The default is to center the projections and divide by half range. See morph_center() for details.

gadget_mode

Run the app as a shiny::runGadget() which will load the app in the RStudio Viewer pane or a browser (default = TRUE). If FALSE will return a regular shiny app object that could be used to deploy the app elsewhere.

Details

The tour interface consists of two views:

  1. the tour view which is a dynamic scatterplot

  2. the axis view which shows the direction and magnitude of the basis vectors being generated.

There are several other user controls available:

Value

The tour interface loads a shiny app either in the Viewer pane if you are using Rstudio or in a browser window. After iterating through the tour and and highlighting subsets of interest, you can click the 'Done' button. This will return a named list with two elements:

See Also

compute_half_range(), morph_center(), limn_tour_link()

Examples

if (interactive()) {
  # tour the first ten columns of the fake tree data
  # loads the default interface
  limn_tour(fake_trees, dim1:dim10)
  # perform the same action but now coloring points
  limn_tour(fake_trees, dim1:dim10, color = branches)
}

[Package liminal version 0.1.2 Index]