Module Server for Specification of Multiple Sample Variables
Source:R/sampleVarSpec.R
multiSampleVarSpecServer.Rd
When multiple sample variables are used in a given module, then this wrapper makes it much easier to specify in the server function.
Arguments
- inputIds
(
character
)
multiple input IDs corresponding to the different sample variables specified in the UI function.- original_data
(reactive
SummarizedExperiment
)
input experiment where the sample variables extracted viaSummarizedExperiment::colData()
should be eligible for selection.- ...
additional arguments as documented in
sampleVarSpecServer()
, namely the mandatoryexperiment_name
and the optionalcategorical_only
,num_levels
andlabel_modal_title
.transformed_data
andassign_lists
should not be specified as they are already specified internally here.
Value
List with the final transformed experiment_data
reactive and a
list vars
which contains the selected sample variables as reactives
under their input ID.
Examples
if (FALSE) {
# In the server use:
sample_var_specs <- multiSampleVarSpecServer(
inputIds = c("facet_var", "color_var"),
experiment_name = reactive({
input$experiment_name
}),
original_data = ori_data # nolint Please update the <ori_data>
)
# Then can extract the transformed data and selected variables later:
experiment_data <- sample_var_specs$experiment_data()
facet_var <- sample_var_specs$vars$facet_var()
color_var <- sample_var_specs$vars$color_var()
}