register_plot_annotation_module: Register an interface for drawing an annotation within...

Description Usage Arguments See Also

View source: R/GUI-PLOTTING-ANNOTATION-AAAA.R

Description

Note that this function is not persistent. You must re-register in every R session you wish to use this annotation type.

Usage

1
register_plot_annotation_module(name, uiFunction, serverFunction)

Arguments

name

Name of the annotation type

uiFunction

Shiny module UI function that takes an id parameter and returns a tagList.

serverFunction

Shiny module server function that returns a list with items:

arguments

Function that returns a list of arguments to be passted to drawFunc

drawFunc

Function that draws the annotation. Takes a list of arguments as returned above, plus x and y coordinates as the first two arguments, and (possibly) a named xpd argument. Should NOT be reactive nor depend on the UI.

script

Function that returns a string containing the code to draw the annotation. Takes the same arguments as drawFunc. Should NOT be reactive nor depend on the UI.

getBoundingRect

Function that returns vector containing the bounding rect of the annotation for hit testing. Takes the same arguments as drawFunc, returns c(left, bottom, right, top).

focus

Function that highlights an annotation (typically by drawing a red border). Takes the same arguments as drawFunc.

updateInputs

Function that updates the UI to reflect the argument list. Takes the same arguments returned by arguments.

See Also

http://shiny.rstudio.com/articles/modules.htm


jmstrat/NMR.Utils documentation built on July 14, 2019, 11:35 p.m.