View source: R/panelFunctionGenerator.R
panelFunctionGenerator | R Documentation |
Convenience function to wrap ftmsRanalysis plotting functions for Trelliscope
panelFunctionGenerator(plot_fn_name, ...)
plot_fn_name |
plot function name, e.g. "vanKrevelenPlot" or "kendrickPlot" |
... |
other parameters to pass to the plotting function other than the data object |
Sometimes the additional parameters to pass to the plotting function will depend
on the key associated with the data in the ddo (e.g. if a column name is prepended with
the group name). In that case, see example below for how
to construct an expr
statement to obtain the necessary information.
Amanda White
## Not run:
library(ftmsRanalysis)
library(trelliscope)
vdbDir <- vdbConn(file.path(tempdir(), "trell_test"), autoYes = TRUE) #temporary directory
data('exampleProcessedPeakData')
groupDdo <- divideByGroup(exampleProcessedPeakData)
groupSummaryDdo <- summarizeGroups(groupDdo, summary_functions = c("prop_present", "n_present"))
# See rlang::expr here:
panelFnG1 <- panelFunctionGenerator(
"vanKrevelenPlot",
colorCName=rlang::expr(paste0(getSplitVar(v, "Group"), "_prop_present")),
legendTitle="Proportion<br>Present")
makeDisplay(groupSummaryDdo,
panelFn=panelFnG1,
name = "Trelliscope test G_1 with VK plot per group",
group = "Group")
view()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.