matrixCtrlServer | R Documentation |
Update matrix data and metadata for the appropriate plotting module.
matrixCtrlServer(
id,
M = NULL,
N = NULL,
P = NULL,
cutoffP = 0.05,
cdata = NULL,
metadata = NULL,
vkey = NULL,
newdata = reactive({ }),
mfilter = NULL
)
id |
Character ID for specifying namespace, see |
M |
A data matrix, e.g. a correlation matrix, which must have row and column names. |
N |
A matrix of the same dimensions as 'M' to be used as a filter layer, e.g. sample size. |
P |
A matrix of the same dimensions as 'M' to be used as a filter layer, e.g. p-values. |
cutoffP |
A cutoff value for 'P' to be used as default for filtering. |
cdata |
The data used for generating the matrix, necessary for allowing user-uploaded data for mutable 'M'. |
metadata |
Optional, a 'data.table' with different types of metadata/annotation to be used as filters. If not given, the only filter option will be the row names in M. Column names will be the names of the filter group. |
vkey |
The column in metadata that maps to row/col names in M, i.e. the key column such as VarID. If metadata is not given, should be something like "Name" because the only selection possible is by row names. |
newdata |
Optional, reactive data such as a user upload passed in by
the cdata to calculate a new 'M'. |
mfilter |
Optional reactive object for storing filter values that need to be communicated to other modules. |
What is available as filters relies on the underlying metadata. The metadata should be a table that can be passed into the parameter
metadata
, with a key column referencing the matrix index
and additional columns for each type of metadata attribute.
The base UI implements interactive filters as drop-down selections.
The server function returns the data with user-applied filters,
i.e. the main input to be visualized with matrixMainServer
.
Reactive values in mstate
object that keeps track of visible matrices
and selected metadata and is used by the associated plotting module.
The UI can also expand/integrate with an optional "add-on" widget to provide an alternate, perhaps more intuitive interface for filtering. For example, compared to a drop-down selection of geographical locations, a map widget would provide a better selection interface. Not all types of metadata can be integrated with a widget, and the module provides capability for only one widget. The server function needs to return when the widget should be called (displayed).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.