slw_snapshot: Make a snapshot of the currently running Sleepwalk app

Description Usage Arguments Value Examples

View source: R/sleepwalk.R

Description

This function produces a static plot that shows a given state of the currently active Sleepwalk app. Double click on a point in the web browser will generate a command that can reproduce this exact state of the app.

Usage

1
slw_snapshot(point, emb = 1, returnList = FALSE)

Arguments

point

an index of the focus point (i.e. the one, over which the mouse is hovering at the moment). To learn the index of a point double click on it in the web browser.

emb

an index of the embedding of the focus point. To learn the index of an embedding double click on any of its points in the web browser.

returnList

if TRUE returns a list of ggplot objects (one per embedding), that can be easily modified later. Otherwise returns a single ggplot objects with all the embeddings.

Value

a ggplot object or a list of ggplot objects.

Examples

1
2
3
data("iris")
sleepwalk(iris[, c(1,3)], iris[1:4], pointSize = 4)
slw_snapshot(10)

sleepwalk documentation built on Sept. 16, 2021, 5:11 p.m.