Shiny apps can often make use of the same key elements, formods provides modules for common tasks (data upload, wragling data, figure genration and saving the app state). These modules can react and interact as well as generate code to create reproducable analyses. formods also defines a framework for creating reactive modules. The vignettes outline how to use these modules as well as how to create other modules within this framework.
You can install the released version of formods from CRAN with:
install.packages("formods")
You can install the development version from GitHub with:
# Installing devtools if it's not already installed
if(system.file(package="devtools") == ""){
install.packages("devtools")
}::install_github("john-harrold/onbrand", dependencies=TRUE)
devtools::install_github("john-harrold/formods", dependencies=TRUE) devtools
Note that because formods
depends on
onbrand
you will need to first install the development
version of onbrand
.
library(shiny)
library(formods)
runApp(system.file(package="formods", "templates","FM_compact.R"))