Create Destroyable Modules in 'Shiny'

Enables the complete removal of various 'Shiny' components, such as inputs, outputs and modules. It also aids in the removal of observers that have been created in dynamically created modules.


shiny.destroy

R-CMD-check

The aim of {shiny.destroy} is to allow inputs and modules created in a shiny application to be removed without keeping any trace of them within the realm of the shiny application.

Installation

Install the latest version of {shiny.destroy} on GitHub

require("remotes")
remotes::install_github("ashbaldry/shiny.destroy")

Usage

There are two types of objects that {shiny.destroy} handles: inputs and modules.

Input

Use the function removeInput to remove the desired input. This is a wrapper around shiny::removeUI, but includes ways to reference the input server-side, and updates any reactives and/or outputs that depend on that input instantly.

Module

Prior to the application loading.

Example

Example shiny.destroy application

The code for this example is available in the examples directory

Limitations

To include sub-modules within the destroyable module, the server-side module will need to be passed through makeModuleServerDestroyable and included as an argument to the parent module to ensure those observers are safely removed.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("shiny.destroy")

0.1.0 by Ashley Baldry, 2 years ago


Browse source code at https://github.com/cran/shiny.destroy


Authors: Ashley Baldry [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports purrr, rlang, shiny

Suggests bslib, htmltools, knitr, rmarkdown, shinytest2, spelling, testthat


See at CRAN