Description Slot overview Getting and setting slots Supported methods Subclass expectations Author(s) See Also
The Panel is a virtual base class for all iSEE panels. It provides slots and methods to control the height and width of each panel, as well as functionality to control the choice of “transmitting” panels from which to receive a multiple row/column selection.
The following slots are relevant to panel organization:
PanelId
, an integer scalar specifying the identifier for the panel.
This should be unique across panels of the same concrete class.
PanelWidth
, an integer scalar specifying the width of the panel.
Bootstrap coordinates are used so this value should lie between 2 and 12; defaults to 4.
PanelHeight
, an integer scalar specifying the height of the panel in pixels.
This is expected to lie between 400 and 1000; defaults to 500.
The following slots are relevant to receiving a multiple selection on the rows:
RowSelectionSource
, a string specifying the name of the transmitting panel from which to receive a multiple row selection (e.g., "RowDataPlot1"
).
Defaults to "---"
.
RowSelectionType
, a string specifying which of the multiple row selections from the transmitting panel should be used.
Takes one of "Active"
, only the active selection;
"Union"
, the union of active and saved selections;
and "Saved"
, one of the saved selections.
Defaults to "Active"
.
RowSelectionSaved
, an integer scalar specifying the index of the saved multiple row selection to use when RowSelectionType="Saved"
.
Defaults to 0.
RowSelectionDynamicSource
, a logical scalar indicating whether x
should dynamically change its selection source for multiple row selections.
Defaults to FALSE
.
The following slots are relevant to receiving a multiple selection on the columns:
ColumnSelectionSource
, a string specifying the name of the transmitting panel from which to receive a multiple column selection (e.g., "ColumnDataPlot1"
).
Defaults to "---"
.
ColumnSelectionType
, a string specifying which of the column-based selections from the transmitting panel should be used.
Takes one of "Active"
, only the active selection;
"Union"
, the union of active and saved selections;
and "Saved"
, one of the saved selections.
Defaults to "Active"
.
ColumnSelectionSaved
, an integer scalar specifying the index of the saved multiple column selection to use when ColumnSelectionType="Saved"
.
Defaults to 0.
ColumnSelectionDynamicSource
, a logical scalar indicating whether x
should dynamically change its selection source for multiple column selections.
Defaults to FALSE
.
There are also the following miscellaneous slots:
SelectionBoxOpen
, a logical scalar indicating whether the selection parameter box should be open at initialization.
Defaults to FALSE
.
SelectionHistory
, a list of arbitrary elements that contain parameters for saved multiple selections.
Each element of this list corresponds to one saved selection in the current panel.
Defaults to an empty list.
In all of the following code chunks, x
is an instance of a Panel,
and i
is a string containing the slot name:
x[[i]]
returns the value of a slot named i
.
x[[i]] <- value
modifies x
so that the value in slot i
is replaced with value
.
In the following code snippets, x
is an instance of a ColumnDotPlot class.
Refer to the documentation for each method for more details on the remaining arguments.
For setting up data values:
.refineParameters(x, se)
calls updateObject(x)
.
If x
is up to date, this operation is a no-op and returns x
without modification.
.cacheCommonInfo(x, se)
is a no-op, returning se
without modification.
For defining the interface:
.defineInterface(x, se, select_info)
will return a list of collapsible boxes for changing data and selection parameters.
The data parameter box will be populated based on .defineDataInterface
.
.defineDataInterface(x, se, select_info)
will return an empty list.
.hideInterface(x, field)
will always return FALSE
.
For monitoring reactive expressions:
.createObservers(x, se, input, session, pObjects, rObjects)
will add observers to respond to changes in multiple selection options.
It will also call .singleSelectionSlots(x)
to set up observers for responding to transmitted single selections.
.renderOutput(x, se, output, pObjects, rObjects)
will add elements to output
for rendering the information textboxes at the bottom of each panel.
Each panel should specialize this method to add rendering expressions for the actual output (e.g., plots, tables),
followed by a callNextMethod
to create the textboxes.
For generating output:
.exportOutput(x, se, all_memory, all_contents)
is a no-op,
i.e., it will return an empty character vector and create no files.
For documentation:
.definePanelTour(x)
returns a data.frame containing the selection-related steps of the tour.
For controlling selections:
.multiSelectionRestricted(x)
will always return TRUE
.
.multiSelectionDimension(x)
will always return "none"
.
.multiSelectionActive(x)
will always return NULL
.
.multiSelectionClear(x)
will always return x
.
.multiSelectionInvalidated(x)
will always return FALSE
.
.multiSelectionAvailable(x, contents)
will return nrow(contents)
.
.singleSelectionDimension(x)
will always return "none"
.
.singleSelectionValue(x)
will always return NULL
.
.singleSelectionSlots(x)
will always return an empty list.
Subclasses are required to implement methods for:
.defineOutput
.generateOutput
.renderOutput
.fullName
.panelColor
Subclasses that transmit selections should also implement specialized methods for selection-related parameters listed above.
Aaron Lun
DotPlot and Table, for examples of direct subclasses.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.