detour {detourr}R Documentation

Initiate a detour visualisation

Description

This function initialises a detour object which, along with the tour_path and show_functions is used to build a detour visualisation.

Usage

detour(.data, mapping)

Arguments

.data

a data frame, tibble, or crosstalk::SharedData object

mapping

a mapping of data columns to aesthetic values using the tour_aes function. The only required aesthetic is projection, which determines which columns are used to generate the tour path and supports tidy selection.

Value

A detour object containing information about the tour path and its parameters

Examples

detour(tourr::flea, tour_aes(projection = -species, colour = species)) |>
  tour_path(grand_tour(3), fps = 60) |>
  show_scatter(alpha = 0.7, axes = FALSE)

[Package detourr version 0.1.0 Index]