Package: VizModules 0.5.0

VizModules: Flexible, Interactive 'shiny' Modules for Almost Any Plot

Offers a core selection of interactivity-first 'shiny' modules for many plot types meant to serve as flexible building blocks for applications and as the base for more complex modules. These modules allow for the rapid and convenient construction of 'shiny' apps with very few lines of code and decouple plotting from the underlying data. These modules allow for full plot aesthetic customization by the end user through UI inputs. Utility functions for simple UI organization, automated UI tooltips, and additional plot enhancements are also provided. Includes a multi-panel figure builder app for arranging multiple modules together in a free-form layout.

Authors:Jared Andrews [aut, cre], Jacob Martin [aut]

VizModules_0.5.0.tar.gz
VizModules_0.5.0.zip(r-4.7-any)VizModules_0.5.0.zip(r-4.6-any)VizModules_0.5.0.zip(r-4.5-any)
VizModules_0.5.0.tgz(r-4.6-any)VizModules_0.5.0.tgz(r-4.5-any)
VizModules_0.5.0.tar.gz(r-4.7-any)VizModules_0.5.0.tar.gz(r-4.6-any)
VizModules_0.5.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
VizModules/json (API)

# Install 'VizModules' in R:
install.packages('VizModules', repos = c('https://j-andrews7.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/j-andrews7/vizmodules/issues

Pkgdown/docs site:https://j-andrews7.github.io

Datasets:

On CRAN:

Conda:

data-visualizationmodulesshinyvisualization

7.97 score 4 stars 113 scripts 480 downloads 161 exports 118 dependencies

Last updated from:c0025658a7. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK387
source / vignettesOK263
linux-releaseOK393
macos-releaseOK285
macos-oldrelOK204
windows-develOK480
windows-releaseOK339
windows-oldrelOK336
wasm-releaseOK177

Exports:add_ablinesadd_hlinesadd_plot_configadd_reference_linesadd_vlinesadjust_column_valuesadjusted_axis_labelapply_axis_title_to_annotationsapply_facet_subplot_spacingapply_legend_inputsapply_legend_stylingapply_plotly_newshapeapply_render_marginsapply_stat_annotationsapply_subplot_axis_stylingapply_title_layoutaxis_titles_as_annotationsbuild_facet_annotationsbuild_facet_panel_bordersbuild_model_row_specclean_facet_dimcollect_source_dataComplexHeatmap_HeatmapAppComplexHeatmap_HeatmapInfoOutputUIComplexHeatmap_HeatmapInputsUIComplexHeatmap_HeatmapMainOutputUIComplexHeatmap_HeatmapOutputUIComplexHeatmap_HeatmapServerComplexHeatmap_HeatmapStaticOutputUIComplexHeatmap_HeatmapSubOutputUIcompute_pairwise_statscreate_axis_stylescreate_ggplot_axis_stylecreate_source_download_handlercreate_stat_annotationscreateModuleAppdataFilterServerdataFilterUIdefault_palettesdittoViz_freqPlotAppdittoViz_freqPlotInputsUIdittoViz_freqPlotOutputUIdittoViz_freqPlotServerdittoViz_scatterPlotAppdittoViz_scatterPlotInputsUIdittoViz_scatterPlotOutputUIdittoViz_scatterPlotServerdittoViz_yPlotAppdittoViz_yPlotInputsUIdittoViz_yPlotOutputUIdittoViz_yPlotServerdraw_to_pngdraw_to_svgdumbbellPlotdumbbellPlotAppdumbbellPlotInputsUIdumbbellPlotOutputUIdumbbellPlotServerempty_plotfigureBuilderAppfigureBuilderServerfigureBuilderUIfinalize_manual_editsgenerate_pair_stringsget_defaultget_documentationget_model_backendheatmap_fit_widthhide_inputis_pure_typelinePlotlinePlotApplinePlotInputsUIlinePlotOutputUIlinePlotServerlinetype_to_dashlist_model_backendsmodule_tack_uimoduleGalleryAppmultiColorPickermultiDynamicInputorganize_inputsparallelCoordinatesPlotparallelCoordinatesPlotAppparallelCoordinatesPlotInputsUIparallelCoordinatesPlotOutputUIparallelCoordinatesPlotServerparse_numeric_listparse_pair_stringspiePlotpiePlotApppiePlotInputsUIpiePlotOutputUIpiePlotServerplotthis_AreaPlotAppplotthis_AreaPlotInputsUIplotthis_AreaPlotOutputUIplotthis_AreaPlotServerplotthis_BarPlotAppplotthis_BarPlotInputsUIplotthis_BarPlotOutputUIplotthis_BarPlotServerplotthis_BoxPlotAppplotthis_BoxPlotInputsUIplotthis_BoxPlotOutputUIplotthis_BoxPlotServerplotthis_DensityPlotAppplotthis_DensityPlotInputsUIplotthis_DensityPlotOutputUIplotthis_DensityPlotServerplotthis_DotPlotAppplotthis_DotPlotInputsUIplotthis_DotPlotOutputUIplotthis_DotPlotServerplotthis_HistogramAppplotthis_HistogramInputsUIplotthis_HistogramOutputUIplotthis_HistogramServerplotthis_SplitBarPlotAppplotthis_SplitBarPlotInputsUIplotthis_SplitBarPlotOutputUIplotthis_SplitBarPlotServerradarPlotradarPlotAppradarPlotInputsUIradarPlotOutputUIradarPlotServerrecycle_line_styleregister_model_backendreset_annotation_inputsreset_axes_inputsreset_axis_title_textreset_legend_inputsreset_lines_inputsreset_plotly_inputsresolve_column_targetsresolve_facet_layoutresolve_facet_sharingresolve_palettesafe_eval_filtersafe_resolve_adj_fxnsetup_auto_update_logicsetup_axis_rangesetup_group_colorssetup_manual_editssetup_reactive_defaultsshow_inputstat_bracket_y_maxstring_to_linetypestoggle_input_celluniform_annotation_inputs_uiuniform_axes_inputs_uiuniform_legend_inputs_uiuniform_lines_inputs_uiuniform_plotly_inputs_uiupdate_viz_selectupdateMultiColorPickerupdateMultiDynamicInputuse_vizmodules_skillsvalidate_expressionviz_select_input

Dependencies:askpassbase64encbrewbslibcachemcallrcellrangercirclizeclicolorspacecolourpickercommonmarkcowplotcpp11crayoncrosstalkcurldata.tabledescdigestdittoVizdplyrDTevaluatefarverfastmapfontawesomeforcatsfsgenericsggnewscaleggplot2ggrepelggridgesGlobalOptionsgluegridtextgtablehighrhmshtmltoolshtmlwidgetshttpuvhttrisobandjpegjquerylibjsonliteknitrlabelinglaterlatticelazyevallifecyclelitedownmagrittrmarkdownmemoisemimeminiUIopensslotelpatchworkpillarpkgbuildpkgconfigpkgloadplotlyplotthisplyrpngprettyunitsprocessxprogresspromisespspurrrR6rappdirsRColorBrewerRcpprdtoolsreadxlrematchreshape2rexrlangrmarkdownroclangroxygen2rprojrootS7sassscalesshapeshinyshinyBSshinyjquishinyjsshinyWidgetssourcetoolsstringistringrsystibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunxml2xtableyamlzipzoo

Adding a New Module
Quick Checklist | Naming & Organization | Documentation Standards | 1. @section Plot parameters not implemented or with altered functionality: | 2. @section Plot parameters and defaults: | 3. @section Plot parameters implementing new functionality: | Functionality & Non-Exposed Inputs | Example App Requirement | Testing Requirements | Implementing a New Plotting Function (e.g., piePlot) | Supporting Reactive Defaults | Updating Your Own Inputs From the Server | Inputs Rebuilt by renderUI() | Axis Limits | Debouncing Free-Text Inputs | Persisting Manual Layout Edits | Server | Key helpers (all in R/plot_helpers.R) | Integrating Statistical Testing (Stats Tab) | UI | Key helpers (all in R/stat_helper.R) | Gallery App and Figure Builder | Review Before Submitting | Style Guide | Input Labels | Select Inputs | Tooltips with tipify | Reuse Uniform Input Helpers | Imports: @importFrom Over :: | Additional Conventions | Styling and CSS Containment | Only ever style classes this package created | A dropdown or popover parented to needs its own marker class | Check that the rule matches what you think it does | Keep layout out of inline styles | Do not assume anything about the parent | Shipping a stylesheet | Verifying containment | Sanitizing User-Provided Expressions | safe_eval_filter(expr_text, data) | validate_expression(expr_text, col_names) | safe_resolve_adj_fxn(fn_name) | What counts as "allowed"?

Last update: 2026-09-29
Started: 2026-01-16

Building Custom Modules
Introduction | The Pattern | A Minimal Example | The UI | The Server | Putting It Together | Hiding Base Module Inputs | Driving Base Module Inputs From Your Wrapper | Automatically Preserving Manual Title/Legend/Annotation Edits | Best Practices

Last update: 2026-09-29
Started: 2025-12-30

Custom Model Lines in Scatter Plots
How It Works | The Pipeline | Using Custom Models in the App | Setting Defaults | Adding a Custom Model Backend | Backend Spec | Example: drc (Dose-Response Curves) | Example: mgcv (GAMs) | Where to Register Backends | How Extra Fields Flow Through | API Reference | Security

Last update: 2026-09-29
Started: 2026-07-24

Defaults and Hiding Controls
defaults: pre-filling inputs | Finding valid keys | Validation | Reactive defaults: driving inputs from app state | Why not update*Input() from the parent? | Passing defaults through createModuleApp() and *App() | hide.inputs: hiding individual controls | Use case: app-level fixed parameters | hide.tabs: hiding entire tab panels | Available tab names | Combining defaults, hide.inputs, and hide.tabs | Using hide.inputs in createModuleApp() and *App() | Hiding inputs dynamically in a custom module

Last update: 2026-09-29
Started: 2026-07-24

Filtering Data with the dataFilter Module
Introduction | What the module does | Arguments | Return value | Showing fewer columns | A minimal example | Linking several modules to one table | How it compares to createModuleApp() | Summary

Last update: 2026-09-29
Started: 2026-08-28

Quick Start with VizModules
See the modules | Working with an AI coding agent | Drop a module into your app | Set defaults and hide controls | App factory with createModuleApp() | Export Summary Data | Which plot parameters are exposed?

Last update: 2026-09-29
Started: 2026-01-16

Statistical Testing
Using the Stats tab | Supported tests | Paired tests | Adjusted, faceted and rotated axes | Downloading statistics | Using the stat helpers in a custom module | Restricting comparisons | Faceted plots and nested grouping | Test and draw on the plotted values | compute_pairwise_stats() return value

Last update: 2026-09-29
Started: 2026-07-24

VizModules Custom Shiny Inputs
multiColorPicker | Overview | Basic Usage | Key Arguments | Reading the Value | Updating from the Server | Summary | multiDynamicInput | Defining Fields with row_spec | Pre-filled Rows with elements | Backend-Specific Fields | Writing Your Own Custom Input | Styling: the rule that matters most | Widgets that escape their container | Confirm your selectors actually match | Other practices worth copying

Last update: 2026-09-29
Started: 2026-07-24

Readme and manuals

Help Manual

Help pageTopics
Build diagonal (abline) line shapes for a plotly figureadd_ablines
Build horizontal line shapes for a plotly figureadd_hlines
Create default Plotly configurationadd_plot_config
Add reference lines to a plotly figure from Shiny inputsadd_reference_lines
Build vertical line shapes for a plotly figureadd_vlines
Adjust numeric column values in a data frame using mathematical transformationsadjust_column_values
Build an adjustment-aware axis labeladjusted_axis_label
Apply axis title font styling to shared facet axis annotationsapply_axis_title_to_annotations
Apply custom subplot spacing to a faceted ggplotly figureapply_facet_subplot_spacing
Apply the uniform Legend inputs to a plotly figureapply_legend_inputs
Apply uniform legend styling to a plotly figureapply_legend_styling
Apply Plotly newshape styling from uniform Plotly inputsapply_plotly_newshape
Apply standard render-time margin layout to a plotly figureapply_render_margins
Apply statistical annotation shapes and annotations to a plotly figureapply_stat_annotations
Apply axis styling to all subplot axes in a plotly figureapply_subplot_axis_styling
Apply plot title styling to a plotly figureapply_title_layout
Convert native cartesian axis titles to draggable annotationsaxis_titles_as_annotations
Build facet subplot annotationsbuild_facet_annotations
Build paper-anchored panel border shapes for a faceted plotly figurebuild_facet_panel_borders
Build a dynamic row_spec from registered backendsbuild_model_row_spec
Clean and validate facet dimension value for lineplot moduleclean_facet_dim
Collect plot and source data for downloadcollect_source_data
Create an example Modular ComplexHeatmap Shiny ApplicationComplexHeatmap_HeatmapApp
Click/brush info output UI component for the ComplexHeatmap moduleComplexHeatmap_HeatmapInfoOutputUI
Input UI components for the ComplexHeatmap moduleComplexHeatmap_HeatmapInputsUI
Main heatmap output UI component for the ComplexHeatmap moduleComplexHeatmap_HeatmapMainOutputUI
Output UI components for the ComplexHeatmap moduleComplexHeatmap_HeatmapOutputUI
Server logic for the ComplexHeatmap moduleComplexHeatmap_HeatmapServer
Static (non-interactive) heatmap output UI component for the ComplexHeatmap moduleComplexHeatmap_HeatmapStaticOutputUI
Sub-heatmap output UI component for the ComplexHeatmap moduleComplexHeatmap_HeatmapSubOutputUI
Compute pairwise statistical tests between groupscompute_pairwise_stats
Create Plotly axis style listcreate_axis_styles
Create ggplot axis styling theme argumentscreate_ggplot_axis_style
Create download handler for plot with source datacreate_source_download_handler
Create plotly shapes and annotations for statistical test resultscreate_stat_annotations
Create an Example Module App from Any Module TriocreateModuleApp
Server logic for the dataFilter moduledataFilterServer
UI component for the dataFilter moduledataFilterUI
Color palette options for palettePickerdefault_palettes
Create an example Modular freqPlot Shiny ApplicationdittoViz_freqPlotApp
Input UI components for the freqPlot moduledittoViz_freqPlotInputsUI
Output UI components for the freqPlot moduledittoViz_freqPlotOutputUI
Server logic for freqPlot moduledittoViz_freqPlotServer
Create an example Modular scatterPlot Shiny ApplicationdittoViz_scatterPlotApp
Input UI components for the scatterPlot moduledittoViz_scatterPlotInputsUI
Output UI components for the scatterPlot moduledittoViz_scatterPlotOutputUI
Server logic for scatterPlot moduledittoViz_scatterPlotServer
Create an example Modular yPlot Shiny ApplicationdittoViz_yPlotApp
Input UI components for the yPlot moduledittoViz_yPlotInputsUI
Output UI components for the yPlot moduledittoViz_yPlotOutputUI
Server logic for yPlot moduledittoViz_yPlotServer
Render a grid or base drawing to PNG bytesdraw_to_png
Render a grid or base drawing to a self-contained SVG fragmentdraw_to_svg
Create an Interactive Dumbbell Plot with plotlydumbbellPlot
Create a Shiny App for Dumbbell PlotsdumbbellPlotApp
Input UI components for the dumbbellPlot moduledumbbellPlotInputsUI
Output UI components for the dumbbellPlot moduledumbbellPlotOutputUI
Server logic for dumbbellPlot moduledumbbellPlotServer
Create an empty ggplot2 plot or plotly plot with input textempty_plot
Bar dataset for bar and split bar plot examplesexample_bar
Example single-cell-style composition data for the freqPlot moduleexample_composition
Example demographics datasetexample_demographics
Example sample-metadata table for the ComplexHeatmap moduleexample_heatmap_column_data
Example gene-expression-style matrix for the ComplexHeatmap moduleexample_heatmap_matrix
Example grouped iris datasetexample_iris
Example single-cell marker gene dataset for dot plotsexample_markers
Example mtcars dataset with factorsexample_mtcars
Example population datasetexample_population
Example pseudo-bulk RNA-seq datasetexample_rnaseq
Example sales datasetexample_sales
Example school earnings dataset for dumbbell plotsexample_school_earnings
Example multi-player skills dataset for radar plotsexample_skills
Create a VizModules Figure Builder ApplicationfigureBuilderApp
Server logic for the Figure Builder modulefigureBuilderServer
UI component for the Figure Builder modulefigureBuilderUI
Render persistent manual plot layout edits across re-rendersfinalize_manual_edits
Generate comparison pair strings from data columnsgenerate_pair_strings
Resolve a default value from a named listget_default
Extract parameter documentation from an R function help pageget_documentation
Get a registered model backendget_model_backend
Fit a hand-built InteractiveComplexHeatmap widget to its container's widthheatmap_fit_width
Hide the grid cells wrapping module inputshide_input
Check if column inputs contain mixed data typesis_pure_type
Create an Interactive Line Plot with plotlylinePlot
Create an example Modular linePlot Shiny ApplicationlinePlotApp
Input UI components for the linePlot modulelinePlotInputsUI
Output UI components for the linePlot modulelinePlotOutputUI
Server logic for linePlot modulelinePlotServer
Convert linetype name to plotly dash stylelinetype_to_dash
List registered model backendslist_model_backends
Create standard tack UI for module inputsmodule_tack_ui
Launch the VizModules module gallerymoduleGalleryApp
Compact multi-group color picker inputmultiColorPicker
Dynamic multi-row input for repeating groups of inputsmultiDynamicInput
Organize arbitrary Shiny inputs into a grid layoutorganize_inputs
Create an Interactive Parallel Coordinates Plot with plotlyparallelCoordinatesPlot
Create an example Modular parallelCoordinatesPlot Shiny ApplicationparallelCoordinatesPlotApp
Input UI components for the parallelCoordinatesPlot moduleparallelCoordinatesPlotInputsUI
Output UI components for the parallelCoordinatesPlot moduleparallelCoordinatesPlotOutputUI
Server logic for parallelCoordinatesPlot moduleparallelCoordinatesPlotServer
Parse comma-separated numeric string to vectorparse_numeric_list
Parse pair strings from UI into list of length-2 vectorsparse_pair_strings
Create a plotly pie chartpiePlot
Create an example Modular piePlot Shiny ApplicationpiePlotApp
Input UI components for the piePlot modulepiePlotInputsUI
Output UI components for the piePlot modulepiePlotOutputUI
Server logic for piePlot modulepiePlotServer
Create an example Modular AreaPlot Shiny Applicationplotthis_AreaPlotApp
Input UI components for the AreaPlot moduleplotthis_AreaPlotInputsUI
Output UI components for the AreaPlot moduleplotthis_AreaPlotOutputUI
Server logic for AreaPlot moduleplotthis_AreaPlotServer
Create an example Modular BarPlot Shiny Applicationplotthis_BarPlotApp
Input UI components for the BarPlot moduleplotthis_BarPlotInputsUI
Output UI components for the BarPlot moduleplotthis_BarPlotOutputUI
Server logic for BarPlot moduleplotthis_BarPlotServer
Create an example Modular BoxPlot Shiny Applicationplotthis_BoxPlotApp
Input UI components for the BoxPlot moduleplotthis_BoxPlotInputsUI
Output UI components for the BoxPlot moduleplotthis_BoxPlotOutputUI
Server logic for BoxPlot moduleplotthis_BoxPlotServer
Create an example Modular DensityPlot Shiny Applicationplotthis_DensityPlotApp
Input UI components for the DensityPlot moduleplotthis_DensityPlotInputsUI
Output UI components for the DensityPlot moduleplotthis_DensityPlotOutputUI
Density Plot Server Moduleplotthis_DensityPlotServer
Create an example Modular DotPlot Shiny Applicationplotthis_DotPlotApp
Input UI components for the DotPlot moduleplotthis_DotPlotInputsUI
Output UI components for the DotPlot moduleplotthis_DotPlotOutputUI
Server logic for DotPlot moduleplotthis_DotPlotServer
Create an example Modular Histogram Shiny Applicationplotthis_HistogramApp
Input UI components for the Histogram moduleplotthis_HistogramInputsUI
Output UI components for the histogramPlot moduleplotthis_HistogramOutputUI
Histogram Plot Server Moduleplotthis_HistogramServer
Create an example Modular SplitBarPlot Shiny Applicationplotthis_SplitBarPlotApp
Input UI components for the SplitBarPlot moduleplotthis_SplitBarPlotInputsUI
Output UI components for the SplitBarPlot moduleplotthis_SplitBarPlotOutputUI
Server logic for SplitBarPlot moduleplotthis_SplitBarPlotServer
Create a plotly radar chartradarPlot
Create an example Modular radarPlot Shiny ApplicationradarPlotApp
Input UI components for the radarPlot moduleradarPlotInputsUI
Output UI components for the radarPlot moduleradarPlotOutputUI
Server logic for radarPlot moduleradarPlotServer
Recycle style vector to match line countrecycle_line_style
Register a model backendregister_model_backend
Reset uniform Annotation inputs to defaultsreset_annotation_inputs
Reset uniform axes inputs to defaultsreset_axes_inputs
Drop persisted axis-title text editsreset_axis_title_text
Reset uniform Legend inputs to defaultsreset_legend_inputs
Reset uniform lines inputs to defaultsreset_lines_inputs
Reset uniform Plotly inputs to defaultsreset_plotly_inputs
Translate column names or positions into DT column targetsresolve_column_targets
Resolve number of rows for a faceted subplot gridresolve_facet_layout
Resolve facet axis sharing from facet.scalesresolve_facet_sharing
Resolve a color palette for plot groupsresolve_palette
Safely evaluate a user-provided filter expression against a data framesafe_eval_filter
Safely resolve an adjustment function name to an actual functionsafe_resolve_adj_fxn
Set up auto-update/isolate logic for reactive contextssetup_auto_update_logic
Track the axis limits a plot should draw withsetup_axis_range
Track the group-to-color mapping a plot should draw withsetup_group_colors
Set up persistent manual plot layout edits across re-renderssetup_manual_edits
Resolve reactive 'defaults' entries into a server-side parameter storesetup_reactive_defaults
Show the grid cells wrapping module inputsshow_input
Y-axis top needed to draw statistical annotation brackets in fullstat_bracket_y_max
Parse and validate linetype string to a vectorstring_to_linetypes
Hide or show the grid cell wrapping a module inputtoggle_input_cell
Generate uniform Annotation input UIuniform_annotation_inputs_ui
Generate uniform Axes input UIuniform_axes_inputs_ui
Generate uniform Legend input UIuniform_legend_inputs_ui
Generate uniform Lines input UIuniform_lines_inputs_ui
Generate uniform Plotly input UIuniform_plotly_inputs_ui
Update a select input created by viz_select_inputupdate_viz_select
Update a multiColorPicker input on the clientupdateMultiColorPicker
Update a multiDynamicInput input on the clientupdateMultiDynamicInput
Install the bundled VizModules agent skills into a projectuse_vizmodules_skills
Validate a user-provided expression string for safetyvalidate_expression
Create a select input that scales to very large choice setsviz_select_input