getMarked: Get currently marked elements

Description Usage Arguments Value Examples

View source: R/lc.R

Description

getMarked returns indices of the chart's elements that are currently marked. To mark elements select them with your mouse while holding the Shift key. Double click on the chart with the Shift key pressed will deselect all the elements. This function is a wrapper of method getMarked of class LCApp.

Usage

1
getMarked(chartId = NULL, layerId = NULL, sessionId = NULL)

Arguments

chartId

An ID of the chart. This argument is optional if there is only one chart.

layerId

An ID of the layer. This argument is optional if there is only one chart with a single layer.

sessionId

An ID of the session from which to get the marked elements. It can be NULL if there is only one active session. Otherwise must be a valid session ID. Check Session for more information on client sessions. If a call to this function was triggered from a web page, the ID of the corresponding session would be used automatically.

Value

a vector of indices or, in the case of heatmaps, an n x 2 matrix where first and second columns contain row and column indices of the marked cells, respectively.

Examples

1
2
3
4
5
6
7
data(iris)

lc_scatter(dat(x = iris$Sepal.Length, y = iris$Petal.Length))

#now mark some points by selecting them with your mouse with Shift pressed

getMarked("Chart1")

rlc documentation built on Jan. 5, 2022, 1:11 a.m.