Create an example Modular parallelCoordinatesPlot Shiny Application
Source:R/parallelCoordinatesPlot_module_app.R
parallelCoordinatesPlotApp.RdThis function generates a Shiny application with modular
parallelCoordinatesPlot() components.
The app features a Data Import section for uploading data,
a Data Table for filtering the active dataset, and a Plot area
for configuring and displaying an interactive parallel coordinates plot.
Usage
parallelCoordinatesPlotApp(
data_list = NULL,
defaults = NULL,
hide.inputs = NULL,
hide.tabs = NULL
)Arguments
- data_list
An optional named list of data frames. If
NULL(the default), the module's example dataset is used, along with its showcase defaults. Each data frame should contain at least two numeric or categorical columns.- defaults
A named list of input IDs and their default values to apply on startup. An entry may also be a
shiny::reactive()orshiny::reactiveVal()to have the input follow the parent app's state; seesetup_reactive_defaults().- hide.inputs
A character vector of input IDs to hide. Their values are still initialized and used, but the controls are not shown in the UI.
- hide.tabs
A character vector of tab names to hide. Inputs in these tabs are still initialized and used, but the controls are not shown in the UI.
Details
When data_list is not provided (or NULL), the app launches on example_sales
with the settings the module gallery (moduleGalleryApp()) opens this module on,
so its main features are on show from the start; any defaults you pass are
applied over those. Uploaded data files are added to the available datasets and
can be selected for plotting. If an uploaded file shares a name with an existing
dataset, the existing one is overwritten with a warning.
This is a convenience wrapper around createModuleApp().
Examples
library(VizModules)
# Launch with default example data:
app <- parallelCoordinatesPlotApp()
if (interactive()) runApp(app)
# Launch with custom data:
app2 <- parallelCoordinatesPlotApp(list("sales" = example_sales))
if (interactive()) runApp(app2)