limn_tour: Tour a high dimensional dataset

Description Usage Arguments Details Value See Also Examples

View source: R/tour-app.R

Description

Tour a high dimensional dataset

Usage

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
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)
}

liminal documentation built on May 28, 2021, 9:06 a.m.