R/panelFunctionGenerator.R
panelFunctionGenerator.Rd
Convenience function to wrap ftmsRanalysis plotting functions for Trelliscope
panelFunctionGenerator(plot_fn_name, ...)
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.
if (FALSE) { # \dontrun{
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()
} # }