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 |
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 |
rescale |
A function that rescales |
morph |
One of |
gadget_mode |
Run the app as a |
Details
The tour interface consists of two views:
the tour view which is a dynamic scatterplot
the axis view which shows the direction and magnitude of the basis vectors being generated.
There are several other user controls available:
A play button, that when pressed will start the tour animation.
A pause button, that when pressed will pause the tour animation.
The title of the view includes the half range. The half range is a scale factor for projections and can be thought of as a way of zooming in and out on points. It can be modified by scrolling (via a mouse-wheel movement). Double-click to reset to the default tour view.
If categorical variable has been used, the legend can be toggled to highlight categories of interest with shift + mouse click. Multiple categories can be selected in this way. To reset double click the legend title.
Brushing is activated by moving the mouse on the tour view. If the tour animation a brush event will pause it.
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:
-
selected_basis
: a matrix consisting of the final projection selected -
tour_brush_box
: a list consisting of the bounding box of brush -
tour_half_range
: the current value of half range parameter
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)
}