matrixAppServer | R Documentation |
See matrixCtrlUI
matrixAppServer(
id,
M,
N,
P,
cdata,
metadata,
vkey,
factorx,
colorby,
colorscales = list(default = list(colorscale_named(pal = "RdBu"), zmin = -1, zmax =
1)),
informd = system.file("info/interactive_matrix.Rmd", package = "DIVE"),
appdata = 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. |
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. |
factorx |
Optional, a function that returns a boolean for whether
a variable should be plotted as factor when given the variable name.
Useful when for some reason factor variables are numeric or character instead of already factor-encoded.
By default, variables are merely checked using |
colorby |
A named list where name matches the (factor) variable in |
colorscales |
Optional, a list of custom colorscale functions that takes a numeric matrix and returns either a named colorscale or custom colorscale used for heatmap. If not given, two default colorscale functions are used. |
informd |
Relative path to the Rmarkdown file, whose contents will be displayed in the modal. |
appdata |
Optional, the path of one or more files that can be mock-uploaded. See details. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.