Learn R Programming

Glimma (version 1.0.0)

gllink: Plot linkages

Description

Helper function for writing the link properties in interactive Glimma plots

Usage

gllink(from, to, src = "none", dest = "none", flag = "none", both = FALSE, info = "none")

Arguments

from
the index of the plot from which the event is dispatched.
to
the index of the plot which receives the event and performs an action.
src
the action that is performed in the "from" plot.
dest
the action that is performed in the "to" plot.
flag
indicates special links for particular chart types.
both
creates symmetric links whereby the "dest" action in "to" also triggers the "src" action in "from".
info
additional info for creating the link.

Value

a link object containing the plot linking information.

Examples

Run this code
data(iris)
data <- data.frame(Name=paste("Flower", 1:nrow(iris), sep="-"), iris)

plot1 <- glScatter(data, xval="Sepal.Length", yval="Sepal.Width", colval="Species")
plot2 <- glScatter(data, xval="Species", yval="Petal.Length", colval="Species")
link1 <- gllink(1, 2, src="hover", dest="hover", both=TRUE)
glimma(plot1, plot2, link1, layout=c(1,2))

Run the code above in your browser using DataLab