mark {rlc} | R Documentation |
Mark elements of a chart
Description
mark
selects a set of elements in a given chart. It is equivalent to
selecting elements interactively by drawing a rectangle with the mouse
while holding the Shift
key. This function is a wrapper of method mark
of
class LCApp
.
Usage
mark(
elements = NULL,
chartId = NULL,
layerId = NULL,
preventEvent = TRUE,
clear = FALSE,
sessionId = NULL
)
Arguments
elements |
numeric vector of indices of the elements to select. |
chartId |
ID of the chart where to select elements (can be omitted if there is only one chart). |
layerId |
ID of the layer where to select elements (can be omitted if the chart has only one layer). |
preventEvent |
if |
clear |
if |
sessionId |
An ID of the session for which to mark elements. Can be |
Examples
## Not run: data("iris")
openPage(FALSE, layout = "table1x2")
#brushing example
#Hold Shift pressed and select a group of point on one of the charts
lc_scatter(dat(
x = iris$Sepal.Length,
y = iris$Petal.Length,
colourValue = iris$Species,
on_marked = function() {
mark(getMarked("A1"), "A2")
}
), "A1")
lc_scatter(dat(
x = iris$Sepal.Width,
y = iris$Petal.Width,
colourValue = iris$Species,
on_marked = function() {
mark(getMarked("A2"), "A1")
}
), "A2")
## End(Not run)