From 2996bf6b23d72441b91ed6af93a7c24e9fae94a2 Mon Sep 17 00:00:00 2001 From: zsigmas <6012476+zsigmas@users.noreply.github.com> Date: Fri, 31 May 2024 14:49:00 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Boehring?= =?UTF-8?q?er-Ingelheim/dv.manager@f613ababbd560dc2d5c7a3bc980e55084e50d3d?= =?UTF-8?q?6=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- articles/arguments_from_module_manager.html | 10 ++++---- articles/customizing_application.html | 26 ++++++++++----------- articles/developing_module.html | 8 +++---- articles/dv-manager.html | 2 +- articles/how_does_work.html | 2 +- news/index.html | 3 +++ pkgdown.yml | 2 +- reference/app_server.html | 10 +------- reference/app_ui.html | 2 +- reference/build_secure_arguments.html | 5 +++- reference/import_from.html | 5 +--- reference/run_app.html | 7 ++++-- search.json | 2 +- 13 files changed, 41 insertions(+), 43 deletions(-) diff --git a/articles/arguments_from_module_manager.html b/articles/arguments_from_module_manager.html index 0cc15f8..7f904c4 100644 --- a/articles/arguments_from_module_manager.html +++ b/articles/arguments_from_module_manager.html @@ -158,8 +158,8 @@
dv.manager offers a lot of options to customize our application. Here we present examples of these options. For this example, we will use as a base the application below.
data <- list(
- adsl = pharmaverseadam::adsl,
- adae = pharmaverseadam::adae
+ adsl = pharmaverseadam::adsl,
+ adae = pharmaverseadam::adae
)
module_list <- list(
@@ -119,8 +119,8 @@ Adding a new module
data <- list(
- adsl = pharmaverseadam::adsl,
- adae = pharmaverseadam::adae
+ adsl = pharmaverseadam::adsl,
+ adae = pharmaverseadam::adae
)
module_list <- list(
@@ -174,7 +174,7 @@ Renaming a module
-data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
+data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
module_list <- list(
"My First Data table" = dv.listings::mod_data_table(
@@ -200,8 +200,8 @@ Changing the data sourceTo modify a module so it has a different data source, we just have to modify the dataset
parameter.
data <- list(
- adsl = pharmaverseadam::adsl,
- adae = pharmaverseadam::adae
+ adsl = pharmaverseadam::adsl,
+ adae = pharmaverseadam::adae
)
module_list <- list(
@@ -229,8 +229,8 @@ Loading several datase
dv.manager offers the possibility of accessing several datasets in a single application. To add a new dataset we just have to add a new entry to the list passed to the data parameter. This entry can be a list of dataframes, or a function that will return a list of dataframes.
-data1 <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
-data2 <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
+data1 <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
+data2 <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
module_list <- list(
"ADSL data table" = dv.listings::mod_data_table(
@@ -265,8 +265,8 @@ Data preprocessing before app
Please visit the vignette("data_filtering")
to understand why USUBJID is kept within the dataset.
data <- list(
- adsl = pharmaverseadam::adsl,
- adae = pharmaverseadam::adae
+ adsl = pharmaverseadam::adsl,
+ adae = pharmaverseadam::adae
)
# We will use dplyr to modify our data.
@@ -311,8 +311,8 @@ Data preprocessing before app
Notice at the bottom of the code block below we use the modified dataset for filtering.
data <- list(
- adsl = pharmaverseadam::adsl,
- adae = pharmaverseadam::adae
+ adsl = pharmaverseadam::adsl,
+ adae = pharmaverseadam::adae
)
library(dplyr)
diff --git a/articles/developing_module.html b/articles/developing_module.html
index e4ff6ba..0d93316 100644
--- a/articles/developing_module.html
+++ b/articles/developing_module.html
@@ -144,7 +144,7 @@ 1. Program a module with Shiny
-dataset <- pharmaverseadam::adsl
+dataset <- pharmaverseadam::adsl
ui <- fluidPage(
module_ui("my_module", names(dataset))
@@ -197,7 +197,7 @@ 2. Wrap this module}
The function defined in the server element will be later evaluated by module manager and it will receive a set of arguments as defined explained in vignette("arguments_from_module_manager")
.
-dataset <- list(adsl = pharmaverseadam::adsl)
+dataset <- list(adsl = pharmaverseadam::adsl)
module_list <- list("First module" = mod_uniq_values(
"adsl",
c("USUBJID", "AGE"),
@@ -297,8 +297,8 @@ An alternative way
Finally, we set up dv.manager in a similar way, but now we have modified the call in module_list
and added a new data set to the data set list.
datasets <- list(
- adsl = pharmaverseadam::adsl,
- adae = pharmaverseadam::adae
+ adsl = pharmaverseadam::adsl,
+ adae = pharmaverseadam::adae
)
module_list <- list(
diff --git a/articles/dv-manager.html b/articles/dv-manager.html
index 9282a23..36e3393 100644
--- a/articles/dv-manager.html
+++ b/articles/dv-manager.html
@@ -98,7 +98,7 @@ Data loading
-data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
+data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
Notice that datasets are all packed together in a single list.
diff --git a/articles/how_does_work.html b/articles/how_does_work.html
index a35594a..f5fbc46 100644
--- a/articles/how_does_work.html
+++ b/articles/how_does_work.html
@@ -103,7 +103,7 @@ Anatomy of DaVinci Modules
Opposed to pure Shiny modules, DaVinci modules are defined in a single call such as the one created in the main example of this documentation.
-data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
+data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)
module_list <- list(
"My First Data table" = dv.listings::mod_data_table(
diff --git a/news/index.html b/news/index.html
index 6f1d6b9..332dc86 100644
--- a/news/index.html
+++ b/news/index.html
@@ -64,6 +64,9 @@ How does it work
+
dv.manager 2.1.1
General code housekeeping
diff --git a/pkgdown.yml b/pkgdown.yml
index 5f9680c..21f16f5 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -14,5 +14,5 @@ articles:
manager_utils: manager_utils.html
passing_data: passing_data.html
timestamp: timestamp.html
-last_built: 2024-05-02T09:40Z
+last_built: 2024-05-31T14:48Z
diff --git a/reference/app_server.html b/reference/app_server.html
index aaeb074..5ef1b1b 100644
--- a/reference/app_server.html
+++ b/reference/app_server.html
@@ -71,7 +71,7 @@ How does it work
Usage
- app_server(input = NULL, output = NULL, session = NULL, id = NULL)
+ app_server(input = NULL, output = NULL, session = NULL)
@@ -85,14 +85,6 @@ Arguments
- golem
-
-
-This server side is built as a golem application. Therefore it will make use of the golem::get_golem_options
-functionality. Particularly, it will receive three variables through this channel: module_list, data and filter_data.
-All this variables are specified in the run_app()
call.
-
data
diff --git a/reference/app_ui.html b/reference/app_ui.html
index f0ed261..e0c081a 100644
--- a/reference/app_ui.html
+++ b/reference/app_ui.html
@@ -78,7 +78,7 @@ Usage
Arguments
- id
This parameter can be either an string id if the app_ui is being used as a module or
-a request if the app_ui is being used as an standalone application created in golem then it becomes
+a request if the app_ui is being used as an standalone application then it becomes
a Internal parameter for {shiny}
DO NOT REMOVE.
diff --git a/reference/build_secure_arguments.html b/reference/build_secure_arguments.html
index 8bd0e78..56c12c7 100644
--- a/reference/build_secure_arguments.html
+++ b/reference/build_secure_arguments.html
@@ -79,7 +79,10 @@ Arguments.data from dplyr — .data • dv.manager .data from dplyr — .data • dv.manager
@@ -69,7 +67,6 @@ How does it work
.data from dplyr
-get_golem_options from golem
diff --git a/reference/run_app.html b/reference/run_app.html
index 4931ba9..6d77259 100644
--- a/reference/run_app.html
+++ b/reference/run_app.html
@@ -93,7 +93,7 @@ Usage
Arguments
- data
the list of datasets to be used in the Shiny application. This data parameter can be defined as:
a named list of lists in which each of the lists will be a list of data.frames. Each of the lists of data.frames
-contains a domain, a structure similar to that returned in a dv.loader::load_data
call.
+contains a domain, a structure similar to that returned in a dv.loader::load_data
call.
a named list of functions in which each of the functions will return a list of data.frames.
@@ -123,7 +123,10 @@ Arguments Accessing util functions","what":"switch2","title":"Arguments from Module Manager","text":"switch2 allows switching tab another programmatic manner.","code":"########### Switch module switch_UI <- function(id, name) { # nolint ns <- shiny::NS(id) shiny::tagList( shiny::h1(name), shiny::actionButton(ns(\"switch\"), \"Switch tab\") ) } switch_server <- function(id, selected, switch_func) { shiny::moduleServer( id, function(input, output, session) { shiny::observeEvent(input$switch, { switch_func(selected) }) } ) } mod_switch <- function(name, selected, module_id) { mod <- list( ui = function(module_id) { switch_UI(module_id, name) }, server = function(afmm) { switch_server(module_id, selected, afmm[[\"utils\"]][[\"switch2\"]]) }, module_id = module_id ) mod } run_app( data = list(), module_list = list( \"Mod 1\" = mod_switch(\"Mod 1\", \"Mod 2\", \"mod1\"), \"Mod 2\" = mod_switch(\"Mod 2\", \"Mod 1\", \"mod2\") ), filter_data = \"\", filter_key = \"USUBJID\" )"},{"path":"/articles/arguments_from_module_manager.html","id":"dispatchers","dir":"Articles","previous_headings":"","what":"Dispatchers","title":"Arguments from Module Manager","text":"Module manager inclue couple convenience functions deal nuances described providing uniform accessing fields . Lets see first example. case let mm_resolve_dispatcher take care nuances, including reactive metareactive nature inputs, us. also allows quickly change source without modifying wrapper function. example can quickly change source just changing first parameter dispatcher. even pass argument non related afmm mm_resolve_dispatcher ignore objects come mm_dispatch function. dispatcher also works utils given proper adjustments wrapper:","code":"mod_table <- function(dataset, mod_id) { mod <- list( ui = table_ui, server = function(afmm) { table_server(id = mod_id, dataset = mm_resolve_dispatcher(dataset, afmm)) }, module_id = mod_id ) mod } data_list <- list( \"D1\" = list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae), \"D2\" = list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) ) module_list <- list( \"Table adsl\" = mod_table(mod_id = \"mod_1\", mm_dispatch(\"filtered_dataset\", \"adsl\")), \"Table adae\" = mod_table(mod_id = \"mod_2\", mm_dispatch(\"filtered_dataset\", \"adsl\")) ) run_app( data = data_list, module_list = module_list, filter_data = \"adsl\", filter_key = \"USUBJID\" ) module_list <- list( \"Table adsl\" = mod_table(mod_id = \"mod_1\", mm_dispatch(\"unfiltered_dataset\", \"adsl\")), \"Table adae\" = mod_table(mod_id = \"mod_2\", mm_dispatch(\"module_output\", \"mod_return_table\")), \"Return table\" = mod_return_table(..., mod_id = \"mod_return_table\"), \"Table independent data\" = mod_table(mod_id = \"mod_indp\", mtcars), ) module_list <- list( \"Mod 1\" = mod_switch(\"Mod 1\", \"Mod 2\", mm_dispatch(\"utils\", \"switch2\"), \"mod1\"), \"Mod 2\" = mod_switch(\"Mod 2\", \"Mod 1\", mm_dispatch(\"utils\", \"switch2\"), \"mod2\") )"},{"path":"/articles/css_namespace.html","id":"adding-custom-css-styles-to-a-module","dir":"Articles","previous_headings":"","what":"Adding custom CSS styles to a module","title":"Adding custom CSS styles to a module","text":"multiple ways adding custom CSS styles Shiny module: Inline styles insert style tag level, style attribute insert style head level, style tag external css file Insert style head HTML page Insert style via includeCSS() function call general options can used Shiny applications. See Using custom CSS app Style apps CSS examples -depth explanations. However, purposes working dv.manager recommend using 3rd alternative order avoid CSS leaking (specific CSS style applied parts/modules larger Shiny application unintentionally).","code":"p(style = \"color:red;\", \"Red text\") ui <- fluidPage( tags$head( tags$style(HTML(\" .shiny-input-container { color: #474747; }\")) ) ) ui <- fluidPage( tags$head( tags$link(rel = \"stylesheet\", type = \"text/css\", href = \"custom_file.css\") ) ) ui <- fluidPage( includeCSS(\"www/custom_file.css\") )"},{"path":"/articles/css_namespace.html","id":"add-custom-css-reference-as-an-html-dependency","dir":"Articles","previous_headings":"Adding custom CSS styles to a module","what":"Add custom CSS reference as an HTML dependency","title":"Adding custom CSS styles to a module","text":"Define CSS styles separate file place inside www folder package Inside UI Shiny module, define HTML dependency pointing file options, please check htmltools::htmlDependency() documentation page. Attach dependency variable UI structure. example: options attaching HTML dependency UI element, please consult htmltools::attachDependencies documentation.","code":"ui <- function(id) { dependency <- htmltools::htmlDependency( name = \"custom-package_name_dep\", # use a name that includes your package name, # so it will be easier to debug later version = 1, # for our purposes any value will suffice src = \"/path/to/custom_css_file/\", stylesheet = \"custom.css\", package = \"package_name\" # needed when the src parameter is relative ) dependency } ui <- function(id) { dependency <- htmltools::htmlDependency( # ... ) shiny::tagList( # ..., dependency ) }"},{"path":"/articles/css_namespace.html","id":"css-namespacing-in-module-manager","dir":"Articles","previous_headings":"Adding custom CSS styles to a module","what":"CSS namespacing in module manager","title":"Adding custom CSS styles to a module","text":"Advantages: Custom CSS module dependencies impact module. dv.manager can still change styles modules desired (example custom Shiny theme) However modules impact dv.manager CSS styles even use !important keyword Limitation: approach prevents unintentional CSS style overflow. work JavaScript libraries (like ones contained styling packages: shinydashboard, flexdashboard similar) actively purposefully change overwrite class names CSS styles runtime. Dependency name must begin prefix “custom-” otherwise namespaced.","code":""},{"path":"/articles/customizing_application.html","id":"adding-a-new-module","dir":"Articles","previous_headings":"","what":"Adding a new module","title":"Customizing our application","text":"add new module just add new entry module_list, specifying module want include application. name entry list serve external (.e. human readable) identifier module_id act internal identifier. Notice modified module_id \"mod2\" also name entry list. must unique across modules!","code":"data <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"My Second Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" ) ### Repeated module_id module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"My Second Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ) ) ### Repeated module name module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod2\" ) )"},{"path":"/articles/customizing_application.html","id":"renaming-a-module","dir":"Articles","previous_headings":"","what":"Renaming a module","title":"Customizing our application","text":"want change display module just modify name appropriate entry. want change module named “Second Data table” “Cool-named module”, just change name entry module_list.","code":"data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"Cool-named module\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/customizing_application.html","id":"changing-the-data-source","dir":"Articles","previous_headings":"","what":"Changing the data source","title":"Customizing our application","text":"modify module different data source, just modify dataset parameter. Notice data tables affected filter located sidebar. example contains modules need single dataset. complex modules may need datasets, please refer documentation particular module.","code":"data <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) module_list <- list( \"ADSL data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"ADAE data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adae\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/customizing_application.html","id":"loading-several-datasets-in-a-single-application","dir":"Articles","previous_headings":"","what":"Loading several datasets in a single application","title":"Customizing our application","text":"dv.manager offers possibility accessing several datasets single application. add new dataset just add new entry list passed data parameter. entry can list dataframes, function return list dataframes.","code":"data1 <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) data2 <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) module_list <- list( \"ADSL data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"ADAE data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adae\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list( \"DS1\" = data1, \"DS2\" = data2 ), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/customizing_application.html","id":"data-preprocessing-before-app-is-launched","dir":"Articles","previous_headings":"","what":"Data preprocessing before app is launched","title":"Customizing our application","text":"application limited load data directly. can modify datasets can explore data efficient way. Lets imagine want : limit filtering possibilities just SEX AGE treat SEX factor filtering change labels variables Please visit vignette(\"data_filtering\") understand USUBJID kept within dataset. Notice filter shows selected data, filtering differs depending data type. Please refer dv.filter approach can used , example: reduce number variable presented data table recalculate new variable age months. Notice bottom code block use modified dataset filtering.","code":"data <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) # We will use dplyr to modify our data. # This library has an extensive documentation, # so if you have any particular doubt about the preprocessing itself, # please refer to the documentation of dplyr. library(dplyr) # Create a new filtering dataset data[[\"adsl_filter\"]] <- data[[\"adsl\"]] %>% select(USUBJID, SEX, AGE) %>% mutate(SEX = as.factor(SEX)) # Place new labels attr(data[[\"adsl_filter\"]][[\"SEX\"]], \"label\") <- \"Participant Sex\" attr(data[[\"adsl_filter\"]][[\"AGE\"]], \"label\") <- \"Age (Years)\" module_list <- list( \"ADSL data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"ADAE data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adae\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl_filter\" ) # We have changed the data source for the filtering data <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) library(dplyr) # Create a new filtering dataset data[[\"adsl_mod\"]] <- data[[\"adsl\"]] %>% select(USUBJID, SEX, AGE) %>% mutate( SEX = as.factor(SEX), AGE_M = AGE * 12 ) # Place new labels attr(data[[\"adsl_mod\"]][[\"SEX\"]], \"label\") <- \"Participant Sex\" attr(data[[\"adsl_mod\"]][[\"AGE_M\"]], \"label\") <- \"Age (Months)\" module_list <- list( \"ADSL data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"ADSL_mod data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl_mod\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl_mod\" ) # We have changed the data source for the filtering"},{"path":"/articles/developing_module.html","id":"developing-a-new-module","dir":"Articles","previous_headings":"","what":"Developing a new module","title":"Developing a new module","text":"Developing modules compatible dv.manager follow similar process developing pure Shiny. consideration must : programming module, must include “wrapper” function compatible dv.manager requirements. can think adapter module plays nicely . requirements explained vignette. dv.manager prepared work ADAM SDTM datasets filtered using common key across datasets specified user, default “USUBJID”, see vignette(\"data_filtering\").","code":""},{"path":"/articles/developing_module.html","id":"program-a-module-with-shiny","dir":"Articles","previous_headings":"Developing a new module","what":"1. Program a module with Shiny","title":"Developing a new module","text":"First program Shiny module usual way (see: Modularizing Shiny app code): example, create module displays number rows data set well number unique entries variable selected user drop-menu. course, module useful, purposes explaining dv.manager works, suffice. code chunk , notice wrap data set reactive expression, done module expect dataset reactive value. case inside module.manager. run module application without using dv.manager.","code":"library(shiny) module_ui <- function(id, column_names) { ns <- NS(id) # this line is standard in all shiny modules tagList( textOutput(ns(\"num_rows\")), selectInput(ns(\"col_select\"), \"Select a column\", choices = column_names), textOutput(ns(\"num_unique\")), ) } module_server <- function(id, dataset) { module <- function(input, output, session) { output$num_rows <- renderText({ paste(\"Number of rows:\", nrow(dataset())) }) output$num_unique <- renderText({ paste( \"There are\", length(unique(dataset()[[input$col_select]])), \"unique values in\", input$col_select ) }) } return( moduleServer(id, module) ) } dataset <- pharmaverseadam::adsl ui <- fluidPage( module_ui(\"my_module\", names(dataset)) ) server <- function(input, output, session) { module_server( \"my_module\", reactive(dataset) ) } shinyApp(ui, server)"},{"path":"/articles/developing_module.html","id":"wrap-this-module","dir":"Articles","previous_headings":"Developing a new module","what":"2. Wrap this module","title":"Developing a new module","text":"use module inside dv.manager must first wrap function receive: parameters needed start module module id return list following fields: ui: function invoked create UI server: one argument function call module server module_id name function mod_uniq_values indicate module . function defined server element later evaluated module manager receive set arguments defined explained vignette(\"arguments_from_module_manager\"). Also notice dv.manager provides us dv.filter left-hand side module selection bar top. come standard every application created using dv.manager.","code":"mod_uniq_values <- function(table_name, column_names, module_id) { mod <- list( # UI function ui = function(mod_id) { module_ui(mod_id, column_names) }, # Server function server = function(afmm) { module_server( module_id, dataset = reactive(afmm[[\"filtered_dataset\"]]()[[table_name]]) ) }, # Module ID module_id = module_id ) return(mod) } dataset <- list(adsl = pharmaverseadam::adsl) module_list <- list(\"First module\" = mod_uniq_values( \"adsl\", c(\"USUBJID\", \"AGE\"), module_id = \"mod1\" )) dv.manager::run_app( data = list(\"DS\" = dataset), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/developing_module.html","id":"an-alternative-way-of-developing-this-example-module","dir":"Articles","previous_headings":"","what":"An alternative way of developing this example module","title":"Developing a new module","text":"can pass one data set, list module update inputs UI based list. Notice case, parameter UI function ID. selectInput UI elements defined, choices option specified. choices updated run-time server function. , two observeEvent functions added update choices input. first update names dataset_list. second update names columns selected data set. two observeEvent added update choices input : names dataset_list names columns selected dataset Next, modify wrapper allows example module used dv.manager. First, remove extra parameter UI function. Notice allows us directly pass function name instead wrapping anonymous function (see previous example). , pass whole filtered_dataset list dataset parameter server function longer specifying just one data set - way, can allow user select data set inside application run-time. allows us remove parameters mod_uniq_values() function definition exception module_id. Finally, set dv.manager similar way, now modified call module_list added new data set data set list. Please, notice module resets interface whenever change data table. occurs observe change dataset. different technique, escapes scope vignette, used control issue.","code":"library(shiny) module_ui <- function(id) { ns <- NS(id) tagList( textOutput(ns(\"num_rows\")), selectInput(ns(\"data_select\"), \"Select a dataset\", choices = NULL), selectInput(ns(\"col_select\"), \"Select a column\", choices = NULL), textOutput(ns(\"num_unique\")), ) } module_server <- function(id, dataset_list) { module <- function(input, output, session) { observeEvent(dataset_list(), { updateSelectInput( inputId = \"data_select\", choices = names(dataset_list()) ) }, once = TRUE ) observeEvent(input$data_select, { updateSelectInput( inputId = \"col_select\", choices = names(dataset_list()[[input$data_select]]) ) }) output$num_rows <- renderText({ paste( \"Number of rows:\", nrow(dataset_list()[[input$data_select]][[input$col_select]]) ) }) output$num_unique <- renderText({ paste( \"There are\", length(unique(dataset_list()[[input$data_select]][[input$col_select]])), \"unique values in\", input$col_select ) }) } return( moduleServer(id, module) ) } # Now, only the module_id parameter is needed mod_uniq_values <- function(module_id) { mod <- list( ui = module_ui, server = function(afmm) { module_server( module_id, dataset = afmm[[\"filtered_dataset\"]] ) }, module_id = module_id ) mod } datasets <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) module_list <- list( \"Row counter\" = mod_uniq_values(module_id = \"mod1\") ) dv.manager::run_app( data = list(\"DS1\" = datasets), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/dv-manager.html","id":"data-loading","dir":"Articles","previous_headings":"","what":"Data loading","title":"Getting started","text":"dv.manager developed work DaVinci modules whose main purpose explore clinical trial data. main input modules data loaded SDTM ADAM datasets. use two dummy datasets dv.manager illustration purposes. Notice datasets packed together single list.","code":"data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)"},{"path":"/articles/dv-manager.html","id":"preprocessing-the-data-optional","dir":"Articles","previous_headings":"","what":"Preprocessing the data (optional)","title":"Getting started","text":"can optionally preprocess loaded data : computing derived variables, rename variables, select subset variables subset population,…","code":""},{"path":"/articles/dv-manager.html","id":"module-selection","dir":"Articles","previous_headings":"","what":"Module selection","title":"Getting started","text":"Now, select modules included application. mentioned , dv.manager contain modules, therefore install dv.listings package (see install dv.listings modules : vignette(\"installing_module_packages\")). already dv.listings installed can skip step. can now include application modules included dv.listings package. example, can use data table dv.listings package. Please notice dataset parameter directly pass dataset (e.g. data.frame tibble), just string indicating datasets loaded want display table. Please refer vignettes `vignette(“how_does_work”)` explanation data dispatched different modules.","code":"# TODO if (!require(\"remotes\")) install.packages(\"remotes\") remotes::install_github(\"Boehringer-Ingelheim/dv.listings\") module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ) )"},{"path":"/articles/dv-manager.html","id":"launching-our-first-application","dir":"Articles","previous_headings":"","what":"Launching our first application","title":"Getting started","text":"launch application now just need call run_app function dv.manager.","code":"dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/how_does_work.html","id":"anatomy-of-davinci-modules","dir":"Articles","previous_headings":"","what":"Anatomy of DaVinci Modules","title":"How does it work (Technic/Develop)","text":"Opposed pure Shiny modules, DaVinci modules defined single call one created main example documentation. modules simple wrappers around pure Shiny modules return list containing: UI function single argument, shiny id. function single parameter call server function. module ID, act way ID pure shiny modules. See example simple module","code":"data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" ) table_UI <- function(id) { # nolint ns <- shiny::NS(id) shiny::tagList( DT::DTOutput(ns(\"table\")) ) } table_server <- function(id, dataset) { shiny::moduleServer( id, function(input, output, session) { output$table <- DT::renderDT( { dataset() }, selection = \"single\" ) returned_rows <- shiny::reactive({ shiny::req(!is.null(input$table_rows_selected)) dataset()[[input$table_rows_selected, \"USUBJID\"]] }) return(returned_rows) } ) } mod_table <- function(dataset, mod_id, table_name) { mod <- list( ui = function(id) { table_UI(id) }, server = function(afmm) { table_server( id = mod_id, dataset = shiny::reactive(afmm[[\"filtered_dataset\"]]())[[table_name]] ) }, module_id = mod_id ) mod }"},{"path":"/articles/how_does_work.html","id":"an-explanation-of-the-code-above","dir":"Articles","previous_headings":"Anatomy of DaVinci Modules","what":"An explanation of the code above:","title":"How does it work (Technic/Develop)","text":"relevant part module server entry list returned module function: function single argument. See vignette(\"arguments_from_module_manager\") longer explanation topic.","code":""},{"path":"/articles/logging.html","id":"how-to-use-it","dir":"Articles","previous_headings":"","what":"How to use it","title":"logging","text":"can start using logger simply activating sending message. default state, logger capture decorate ‘message’ ‘warning’ condition. Simply put, message send using message, warning, rlang::inform rlang::warn. Usually favour rlang functions adding fields use logger simpler.","code":"dv.manager::log_activate() rlang::inform(\"Logged message\") dv.manager::log_deactivate()"},{"path":"/articles/logging.html","id":"using-logging-levels","dir":"Articles","previous_headings":"","what":"Using logging levels","title":"logging","text":"logger can different print granularities depending logging level selected. different level can specified logging messages sent including logging level field . logging levels numerical value can checked :","code":"dv.manager::log_activate(dv.manager:::log_default_handlers(level = \"info\")) rlang::inform(\"This will be printed\", level = \"info\") rlang::inform(\"This will not\", level = \"debug\") dv.manager::log_deactivate() dv.manager::log_get_levels()"},{"path":"/articles/logging.html","id":"logging-messages-sent-from-your-module","dir":"Articles","previous_headings":"","what":"Logging messages sent from your module","title":"logging","text":"common use case using logger send messages inside module. can include package name argument send message. can done simple way using rlang can use packageName function dynamically get name package. can also call log_use_log dv.manager root package containing module. add file R/ directory two convenience functions automatically add package name.","code":"dv.manager::log_activate() rlang::inform(\"An inform with package name\", package = \"my_package\") dv.manager::log_deactivate() # Will create an R/utils_logging.R file with two convenience functions dv.manager::log_use_log() devtools::load_all() dv.manager::log_activate() log_inform(\"An inform with package name\") log_warning(\"A warning with package name\") dv.manager::log_deactivate()"},{"path":"/articles/logging.html","id":"advanced-logging","dir":"Articles","previous_headings":"","what":"Advanced logging","title":"logging","text":"dv.manager logging system based R’s condition system. logging system simply specifies set globalCallingHandlers capture log messages, warnings /errors specified handlers.","code":""},{"path":"/articles/logging.html","id":"the-default-handlers","dir":"Articles","previous_headings":"Advanced logging","what":"The default handlers","title":"logging","text":"low level logging makes flexible. default, condition contain fields standard rlang::inform rlang::warn important: message: [character(1)] message logged expects module developer added fields: package: [character(1)] name package sent condition (added automatically log_info log_warn used). level: [numeric(1)] level logging granularity. handlers try add following fields condition formatting: date: [character(1)] timestamp message. ns: [character(1)] namespace module sent condition. sess_id: [character(1)] Shiny session id sent condition. short_sess_id: [character(1)] truncated version sess_id improve human-readibility. default handlers present format information. log_add* functions add extra fields condition can used later log_format() create logging message. print messages use cli package. log_format function convenience function allows quick formatting condition. allows using glue-like string parameters fields condition. field used format present NA value returned instead.","code":"library(magrittr) log_default_handlers <- function(level = 999) { format_str <- \"[{date}][{package}|{short_sess_id}|{ns}]:{message}\" cnd_to_str <- function(cnd) { cnd %>% dv.manager::log_add_date() %>% dv.manager::log_add_ns() %>% dv.manager::log_add_sess_id() %>% dv.manager::log_add_short_sess_id() %>% dv.manager::log_format(format_str) } list( message = function(cnd) { if (dv.manager::log_check_print(cnd, level)) cli::cli_alert_info(cnd_to_str(cnd)) rlang::cnd_muffle(cnd) }, warning = function(cnd) { if (dv.manager::log_check_print(cnd, level)) cli::cli_alert_warning(cnd_to_str(cnd)) rlang::cnd_muffle(cnd) } ) }"},{"path":"/articles/logging.html","id":"creating-custom-handlers","dir":"Articles","previous_headings":"Advanced logging","what":"Creating custom handlers","title":"logging","text":"default handlers convenient, logging behavior can modified using different set handlers… can see can add new fields logging, can supress messages depending fields, etc. allows filtering logging messages package, session, logging level, etc. adapts particular need development.","code":"library(magrittr) my_handlers <- function() { format_str <- \"Date:{date}|Pkg:{package}|{custom_field}:{message}\" cnd_to_str <- function(cnd) { cnd %>% dv.manager::log_add_date() %>% dv.manager::log_format(format_str) } list( message = function(cnd) { if (cnd[[\"print_me\"]]) cli::cli_alert_info(cnd_to_str(cnd)) rlang::cnd_muffle(cnd) }, warning = function(cnd) { cli::cli_alert_warning(cnd_to_str(cnd)) rlang::cnd_muffle(cnd) } ) } dv.manager::log_activate(my_handlers()) dv.manager:::log_inform(\"I will print this and its custom_field will be 1\", print_me = TRUE, custom_field = \"1\") dv.manager:::log_inform(\"I will print this and its custom_field will be NA\", print_me = TRUE) dv.manager:::log_inform(\"I will not print this\", print_me = FALSE) dv.manager::log_deactivate()"},{"path":"/articles/logging.html","id":"troubleshooting","dir":"Articles","previous_headings":"","what":"Troubleshooting","title":"logging","text":"log_activate called, error similar following appears: Error globalCallingHandlers(…) : called handlers stack error means activating logger environment already defined calling handlers, usually withCallingHandlers. shiny particular app starts, therefore activate logging inside application. logger based setting globalCallingHandlers setting tricky within functions. recommendation make call log_activate root session within functions.","code":""},{"path":"/articles/manager_utils.html","id":"switch_tab-utility","dir":"Articles","previous_headings":"","what":"switch_tab utility","title":"dv.manager Utilities","text":"function allows developer switch another module within module. include example app.","code":"# - name: a title to display inside the module # - id: shiny id switch_ui <- function(id, name) { ns <- shiny::NS(id) shiny::tagList( shiny::h1(name), shiny::actionButton(ns(\"switch\"), \"Switch tab\") ) } # - id the shiny module id # - selected The name of the tab that we want to switch to # - switch_func the switching function switch_server <- function(id, selected, switch_func) { shiny::moduleServer( id, function(input, output, session) { shiny::observeEvent(input$switch, { switch_func(selected) }) } ) } # - name A title that will be shown inside the module # - selected The name of the tab that we want to switch to # - module_id shiny module ID mod_switch <- function(name, selected, module_id) { mod <- list( ui = function(module_id) { switch_ui(module_id, name) }, server = function(afmm) { switch_server(module_id, selected, afmm[[\"utils\"]][[\"switch_function\"]]) }, module_id = module_id ) mod } app <- function() { dv.manager::run_app( data = list(), module_list = list( \"Mod 1\" = mod_switch( name = \"Mod 1\", # Note that in this case we make reference to the name of the entry in the list and not to the module_id. # This functionality is based on updateTabsetpanel that works with the tab titles. selected = \"Mod 2\", module_id = \"mod1\" ), \"Mod 2\" = mod_switch( name = \"Mod 2\", selected = \"Mod 1\", module_id = \"mod2\" ) ), filter_data = \"\", filter_key = \"\" ) } app()"},{"path":"/articles/passing_data.html","id":"important-note","dir":"Articles","previous_headings":"","what":"IMPORTANT NOTE","title":"Passing data between modules","text":"element returned, afmm[[\"module_output\"]]()[[selection]] reactive, must transformed reactive (usually metaReactive) wrapper metaReactive(afmm[[\"module_output\"]]()[[selection]]). done way moment modules invoked, module_output exist yet value retrieved server functions run variable exists inside app_server environment.","code":""},{"path":"/articles/timestamp.html","id":"data-timestamp","dir":"Articles","previous_headings":"","what":"Data timestamp","title":"Add timestamp to app data","text":"dv.manager shows last time modification data used application. checks meta attribute datasets loaded app. Specifically, expects meta list entry mtime contains POSIXct date time. Usually, dv.loader sets attribute automatically loading data action needed. Nonetheless, data modified loading, attribute deleted cases, see example , necessary keep track reset needed.","code":"data <- list( dummy = list( adsl = tibble::tibble( USUBJID = c(1, 2, 3), AGE = c(1, 2, 3) ) ) ) # This attribute is automatically set when using dv.loader attr(data[[\"dummy\"]][[\"adsl\"]], \"meta\") <- list(mtime = as.POSIXct(\"2023-02-28 12:00:00 CET\")) # This app shows the date specified in the previous step. dv.manager::run_app( data = data, module_list = list(), filter_data = \"adsl\" ) data <- list( dummy = list( adsl = tibble::tibble( USUBJID = c(1, 2, 3), AGE = c(1, 2, 3) ) ) ) # Normally set by dv.loader attr(data[[\"dummy\"]][[\"adsl\"]], \"meta\") <- list(mtime = as.POSIXct(\"2023-02-28 12:00:00 CET\")) adsl2 <- tibble::tibble( USUBJID = c(1, 2, 3), COUNTRY = c(\"A\", \"B\", \"C\") ) # Save the date of the original dataset adsl_date <- attr(data[[\"dummy\"]][[\"adsl\"]], \"meta\") # Attribute is lost by the left_join data[[\"dummy\"]][[\"adsl\"]] <- dplyr::left_join(adsl2, data[[\"dummy\"]][[\"adsl\"]]) # Reset date attribute afterwards attr(data[[\"dummy\"]][[\"adsl\"]], \"meta\") <- adsl_date dv.manager::run_app( data = data, module_list = list(), filter_data = \"adsl\" )"},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Boehringer-Ingelheim Pharma GmbH & Co.KG. Copyright holder, funder. Sorin Voicu. Author. Luis Morís Fernández. Maintainer, author.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Voicu S, Morís Fernández L (2024). dv.manager: DaVinci Module Manager. R package version 2.1.1.","code":"@Manual{, title = {dv.manager: DaVinci Module Manager}, author = {Sorin Voicu and Luis {Morís Fernández}}, year = {2024}, note = {R package version 2.1.1}, }"},{"path":"/index.html","id":"dvmanager","dir":"","previous_headings":"","what":"Build complex Shiny apps in a simple way","title":"Build complex Shiny apps in a simple way","text":"dv.manager package designed make quick easy create deploy Shiny applications using modules DaVinci.","code":""},{"path":"/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Build complex Shiny apps in a simple way","text":"","code":"if (!require(\"remotes\")) install.packages(\"remotes\") remotes::install_github(\"Boehringer-Ingelheim/dv.manager\")"},{"path":"/reference/add_date_range.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a date_range attribute to a dataset — add_date_range","title":"Add a date_range attribute to a dataset — add_date_range","text":"function add attribute date_range dataset. source dates mtime (POSIXct) entry meta attribute provided dv.loader. different domains contained list single dataset, attribute contain minimum maximum modification date domains dataset. See vignette(\"customizing_application\")","code":""},{"path":"/reference/add_date_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a date_range attribute to a dataset — add_date_range","text":"","code":"add_date_range(dataset)"},{"path":"/reference/add_date_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a date_range attribute to a dataset — add_date_range","text":"dataset dataset loaded dv.loader","code":""},{"path":"/reference/add_date_range.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add a date_range attribute to a dataset — add_date_range","text":"case entries dataset expected attribute, show warning.","code":""},{"path":"/reference/app_server.html","id":null,"dir":"Reference","previous_headings":"","what":"Server side of the dv.manager — app_server","title":"Server side of the dv.manager — app_server","text":"Server side dv.manager","code":""},{"path":"/reference/app_server.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Server side of the dv.manager — app_server","text":"","code":"app_server(input = NULL, output = NULL, session = NULL, id = NULL)"},{"path":"/reference/app_server.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Server side of the dv.manager — app_server","text":"input, output, session Internal parameters shiny. REMOVE. id id app_server used module","code":""},{"path":"/reference/app_server.html","id":"golem","dir":"Reference","previous_headings":"","what":"golem","title":"Server side of the dv.manager — app_server","text":"server side built golem application. Therefore make use golem::get_golem_options functionality. Particularly, receive three variables channel: module_list, data filter_data. variables specified run_app() call.","code":""},{"path":"/reference/app_server.html","id":"data","dir":"Reference","previous_headings":"","what":"data","title":"Server side of the dv.manager — app_server","text":"data fundamental data source application launched dv.manager data source named list : lists data.frames loaded dv.loader functions called return list data.frames Entries list selected data.frames dispatched module according code defines application data dispatched modules filtered according global dv.filter (see filter_data section) name selected dataset appear sidebar, according name provided list date dataset automatically displayed selecting earliest latest date composing data.frames. dv.manager assumes data.frames within dataset attribute meta, within , look entry mtime assumption met dataset loaded directly dv.loader, nonetheless, attributes may need created new derived data.frames preprocessing programmer obligation check datasets attribute correct.","code":""},{"path":"/reference/app_server.html","id":"filter-data","dir":"Reference","previous_headings":"","what":"filter_data","title":"Server side of the dv.manager — app_server","text":"datasets data filtered following way: dataset global filtering defined filter_data dataset filtered dv.filter user input remaining USUBJIDs (default, see filter_key field run_app) used filter rest datasets","code":""},{"path":"/reference/app_server.html","id":"module-list","dir":"Reference","previous_headings":"","what":"module_list","title":"Server side of the dv.manager — app_server","text":"module_list contain list modules used application. entry list contain following fields: name entry list (unique), used selection menus, therefore must meaningful intended human use. ui: UI function need single parameter, id. Almost always entry module_id server: function receive single parameter. See vignette(\"arguments_from_module_manager\") module_id: unique alphanumeric string identify module, used internally therefore intended machine use. Additionally, expect value input$mod_select identify module currently selected. used produce log selection used selecting UI conditional panels.","code":""},{"path":"/reference/app_ui.html","id":null,"dir":"Reference","previous_headings":"","what":"The application User-Interface using an HTML template — app_ui","title":"The application User-Interface using an HTML template — app_ui","text":"application User-Interface using HTML template","code":""},{"path":"/reference/app_ui.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The application User-Interface using an HTML template — app_ui","text":"","code":"app_ui(id)"},{"path":"/reference/app_ui.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The application User-Interface using an HTML template — app_ui","text":"id parameter can either string id app_ui used module request app_ui used standalone application created golem becomes Internal parameter {shiny} REMOVE.","code":""},{"path":"/reference/build_secure_arguments.html","id":null,"dir":"Reference","previous_headings":"","what":"Securize an application using an Azure — build_secure_arguments","title":"Securize an application using an Azure — build_secure_arguments","text":"Securize application using Azure","code":""},{"path":"/reference/build_secure_arguments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Securize an application using an Azure — build_secure_arguments","text":"","code":"build_secure_arguments(azure_options, app_ui, app_server)"},{"path":"/reference/build_secure_arguments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Securize an application using an Azure — build_secure_arguments","text":"azure_options named vector/list containing options Azure Authentication: Required fields: redirect, resource, tenant, app, version, password. See AzureAuth::build_authorization_uri . NULL application secure. app_ui, app_server shiny ui server functions","code":""},{"path":"/reference/build_secure_arguments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Securize an application using an Azure — build_secure_arguments","text":"list entries ui_func srv_func options contains securized version app.","code":""},{"path":"/reference/get_date_range.html","id":null,"dir":"Reference","previous_headings":"","what":"Return a range of dates — get_date_range","title":"Return a range of dates — get_date_range","text":"Calculates range dates list POSIXct objects. entries NULL show warning indicating entries NULL. entries date object throw error.","code":""},{"path":"/reference/get_date_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return a range of dates — get_date_range","text":"","code":"get_date_range(x)"},{"path":"/reference/get_date_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return a range of dates — get_date_range","text":"x list date objects","code":""},{"path":"/reference/get_date_range.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return a range of dates — get_date_range","text":"character vector two entries, first last date input vector.","code":""},{"path":"/reference/has_all_items_named.html","id":null,"dir":"Reference","previous_headings":"","what":"tests if all elements of a list are named — has_all_items_named","title":"tests if all elements of a list are named — has_all_items_named","text":"true elements name length(0).","code":""},{"path":"/reference/has_all_items_named.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tests if all elements of a list are named — has_all_items_named","text":"","code":"has_all_items_named(x)"},{"path":"/reference/has_all_items_named.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"tests if all elements of a list are named — has_all_items_named","text":"x list tested","code":""},{"path":"/reference/import_from.html","id":null,"dir":"Reference","previous_headings":"","what":".data from dplyr — .data","title":".data from dplyr — .data","text":".data dplyr get_golem_options golem","code":""},{"path":"/reference/include_css.html","id":null,"dir":"Reference","previous_headings":"","what":"Include CSS files from path /inst/css/ — include_css","title":"Include CSS files from path /inst/css/ — include_css","text":"Imports custom CSS files","code":""},{"path":"/reference/include_css.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include CSS files from path /inst/css/ — include_css","text":"","code":"include_css(pattern = \"*\")"},{"path":"/reference/include_css.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include CSS files from path /inst/css/ — include_css","text":"pattern Default search file pattern","code":""},{"path":"/reference/include_js.html","id":null,"dir":"Reference","previous_headings":"","what":"Include JS files from path /inst/js/ — include_js","title":"Include JS files from path /inst/js/ — include_js","text":"Imports custom JS files","code":""},{"path":"/reference/include_js.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include JS files from path /inst/js/ — include_js","text":"","code":"include_js(pattern = \"*\")"},{"path":"/reference/include_js.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include JS files from path /inst/js/ — include_js","text":"pattern Default search file pattern","code":""},{"path":"/reference/log_with_logging_handlers.html","id":null,"dir":"Reference","previous_headings":"","what":"globalCallinHandlers do not capture the output of UI and Server for some reason therefore\nspecific with handlers are applied to them\nBecause there is no easy way of passing those handlers we use an option to pass those. — log_with_logging_handlers","title":"globalCallinHandlers do not capture the output of UI and Server for some reason therefore\nspecific with handlers are applied to them\nBecause there is no easy way of passing those handlers we use an option to pass those. — log_with_logging_handlers","text":"globalCallinHandlers capture output UI Server reason therefore specific handlers applied easy way passing handlers use option pass .","code":""},{"path":"/reference/log_with_logging_handlers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"globalCallinHandlers do not capture the output of UI and Server for some reason therefore\nspecific with handlers are applied to them\nBecause there is no easy way of passing those handlers we use an option to pass those. — log_with_logging_handlers","text":"","code":"log_with_logging_handlers(fnc)"},{"path":"/reference/logging.html","id":null,"dir":"Reference","previous_headings":"","what":"logger — logging","title":"logger — logging","text":"article refers functions used logger. Please refer vignette(\"logging\").","code":""},{"path":"/reference/logging.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"logger — logging","text":"","code":"log_activate(h = log_default_handlers(), .rm_gh = TRUE) log_deactivate(h, .rm_gh = TRUE) log_default_handlers(level = 999) log_add_date(cnd) log_add_short_sess_id(cnd) log_test_level(cnd, level, .default = TRUE) log_format(cnd, ...) log_add_sess_id(cnd) log_add_ns(cnd) log_get_level_list() log_use_log()"},{"path":"/reference/logging.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"logger — logging","text":"h [function(0+)] named list functions manage signaled conditions .rm_gh [logical(1)] Remove previous globalCallingHandlers? level [character(1)|numeric(1)] Logging level cnd [condition(1)] condition .default [logical(1)] default behavior level found condition ... parameter passed glue","code":""},{"path":"/reference/logging.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"logger — logging","text":"removes previous globalCallingHandlers default","code":""},{"path":"/reference/logging.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"logger — logging","text":"log_activate(): Activate logging log_deactivate(): deactivate logging log_default_handlers(): get default handlers log_add_date(): add date field condition log_add_short_sess_id(): add short_sess_id condition log_test_level(): Tests cnd level lower logger level log_format(): creates log string according format. log_add_sess_id(): add sess_id condition log_add_ns(): add ns condition log_get_level_list(): List levels logger log_use_log(): Adds utils_logging file package","code":""},{"path":"/reference/mm_dispatch.html","id":null,"dir":"Reference","previous_headings":"","what":"Functional dispatcher helper functions — mm_dispatch","title":"Functional dispatcher helper functions — mm_dispatch","text":"Dispatch helper function allows accessing data utility functions inside module manager dynamic way.","code":""},{"path":"/reference/mm_dispatch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functional dispatcher helper functions — mm_dispatch","text":"","code":"mm_dispatch(from, selection = character(0))"},{"path":"/reference/mm_dispatch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functional dispatcher helper functions — mm_dispatch","text":"string indicating structure want access inside module manager selection optional subsetting within selected data structure","code":""},{"path":"/reference/mm_dispatch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functional dispatcher helper functions — mm_dispatch","text":"parameter can take following values: unfiltered_dataset filtered_dataset url_parameters module_output utils","code":""},{"path":[]},{"path":"/reference/mm_dispatch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functional dispatcher helper functions — mm_dispatch","text":"","code":"mm_dispatch(\"unfiltered_dataset\", \"adsl\") #> $from #> [1] \"unfiltered_dataset\" #> #> $selection #> [1] \"adsl\" #> #> attr(,\"class\") #> [1] \"mm_dispatcher\" mm_dispatch(\"utils\", \"switch2\") #> $from #> [1] \"utils\" #> #> $selection #> [1] \"switch2\" #> #> attr(,\"class\") #> [1] \"mm_dispatcher\""},{"path":"/reference/mm_resolve_dispatcher.html","id":null,"dir":"Reference","previous_headings":"","what":"Dispatcher resolver — mm_resolve_dispatcher","title":"Dispatcher resolver — mm_resolve_dispatcher","text":"Dispatcher resolver","code":""},{"path":"/reference/mm_resolve_dispatcher.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dispatcher resolver — mm_resolve_dispatcher","text":"","code":"mm_resolve_dispatcher(dispatcher, afmm, flatten = FALSE)"},{"path":"/reference/mm_resolve_dispatcher.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dispatcher resolver — mm_resolve_dispatcher","text":"dispatcher list class \"mm_dispatcher\" resolved. object class returned unmodified. afmm list arguments module manager flatten dispatcher selection length 1 disppatcher class \"mm_dispatcher\" return first element instead one element list. default, try flatten . selection greater 1 flatten must FALSE, otherwise error thrown.","code":""},{"path":[]},{"path":"/reference/mod_simple.html","id":null,"dir":"Reference","previous_headings":"","what":"A simple module that counts the number of rows — simple_UI","title":"A simple module that counts the number of rows — simple_UI","text":"simple module used demonstration purposes documentation","code":""},{"path":"/reference/mod_simple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A simple module that counts the number of rows — simple_UI","text":"","code":"simple_UI(id) simple_server(id, dataset) mod_simple(dataset, module_id)"},{"path":"/reference/mod_simple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A simple module that counts the number of rows — simple_UI","text":"id shiny id dataset input dataset module_id shiny module ID","code":""},{"path":"/reference/mod_simple.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"A simple module that counts the number of rows — simple_UI","text":"simple_UI(): Module UI simple_server(): Module server","code":""},{"path":"/reference/mod_switch.html","id":null,"dir":"Reference","previous_headings":"","what":"A module that allows switching to another module — switch_UI","title":"A module that allows switching to another module — switch_UI","text":"simple module used demonstration purposes documentation","code":""},{"path":"/reference/mod_switch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A module that allows switching to another module — switch_UI","text":"","code":"switch_UI(id, name) switch_server(id, selected, switch_func) mod_switch(name, selected, switch_func, module_id)"},{"path":"/reference/mod_switch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A module that allows switching to another module — switch_UI","text":"id shiny module id+ name title shown inside module selected name tab want switch switch_func function passed name tab switches focus module_id shiny module ID","code":""},{"path":"/reference/mod_switch.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"A module that allows switching to another module — switch_UI","text":"switch_UI(): Module UI switch_server(): Module server","code":""},{"path":"/reference/ns_css.html","id":null,"dir":"Reference","previous_headings":"","what":"Namespaces the CSS dependency of a {shiny} tag — ns_css","title":"Namespaces the CSS dependency of a {shiny} tag — ns_css","text":"default scope CSS styles global. means certain CSS style applied across HTML page. presents problems one module styles override another module styles.","code":""},{"path":"/reference/ns_css.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Namespaces the CSS dependency of a {shiny} tag — ns_css","text":"","code":"ns_css( module = NULL, disable_css_namespacing = isTRUE(getOption(\"dv.manager.disable_css_namespacing\")) )"},{"path":"/reference/ns_css.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Namespaces the CSS dependency of a {shiny} tag — ns_css","text":"module {shiny} module disable_css_namespacing disables css namespacing returns input module unmodified","code":""},{"path":"/reference/ns_css.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Namespaces the CSS dependency of a {shiny} tag — ns_css","text":"Namespacing CSS addresses issue creating special tags isolate effect CSS namespace. particular cases, css namespacing can create interactions modules. disabling flag included rare cases. flag can passed explicitly take default value options(\"dv.manager.disable_css_namespacing\"). detail every module developer uses custom css consider defining custom dependency via {htmltools::htmlDependency} name dependency start custom-. examples pleasee see vigniette.","code":""},{"path":"/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator from dplyr — %>%","title":"Pipe operator from dplyr — %>%","text":"Pipe operator dplyr","code":""},{"path":"/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator from dplyr — %>%","text":"","code":"lhs %>% rhs"},{"path":"/reference/run_app.html","id":null,"dir":"Reference","previous_headings":"","what":"Run the Shiny Application — run_app","title":"Run the Shiny Application — run_app","text":"function serves entry point applications created user.","code":""},{"path":"/reference/run_app.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run the Shiny Application — run_app","text":"","code":"run_app( data = NULL, module_list = list(), title = \"Untitled\", filter_data = NULL, filter_key = if (!is.null(data)) { \"USUBJID\" } else { NULL }, startup_msg = NULL, azure_options = NULL, reload_period = NULL, enableBookmarking = \"server\", .launch = TRUE )"},{"path":"/reference/run_app.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run the Shiny Application — run_app","text":"data list datasets used Shiny application. data parameter can defined : named list lists lists list data.frames. lists data.frames contains domain, structure similar returned dv.loader::load_data call. named list functions functions return list data.frames. module_list list modules included Shiny application title title displayed browser tab filter_data string indicating loaded datasets used filtering. filter_key string specifying common field across datasets used expand filtering. Default = \"USUBJID\" NULL data = NULL startup_msg message displayed start application. can either NULL modal message defined shiny::modalDialog. azure_options named vector/list containing options Azure Authentication: Required fields: redirect, resource, tenant, app, version, password. See AzureAuth::build_authorization_uri . NULL application secure. reload_period Either lubridate object specify duration positive numeric value interpreted lubridate duration object days. default NULL enableBookmarking Can one \"url\", \"server\", \"disable\". default value, NULL, respect setting previous calls enableBookmarking(). See enableBookmarking() information bookmarking app. .launch default always TRUE. false debugging testing. TRUE return app. FALSE return options app launched.","code":""},{"path":"/news/index.html","id":"dvmanager-211","dir":"Changelog","previous_headings":"","what":"dv.manager 2.1.1","title":"dv.manager 2.1.1","text":"General code housekeeping Move tests shinytest shinytest2","code":""},{"path":"/news/index.html","id":"dvmanager-210","dir":"Changelog","previous_headings":"","what":"dv.manager 2.1.0","title":"dv.manager 2.1.0","text":"dispatchers now include flatten argument. selection length 1 flattens list TRUE. selection length greater 1 flatten must FALSE. Passing expressions using sessionuserDatamanager_utils$switch_tab now defunct \"server\" bookmarking selected app running shiny-server refer user : https://docs.rstudio.com/shiny-server/#bookmark_state_dir forbookmark storage configuration. local approaches: https://community.rstudio.com/t/changing-bookmark-state-directory--saving--disk/37877 (Undocumented) now includes simple logging system described : dataset_name entry deprecated following versions. Allows periodical reloading datasets via reload_period parameter.","code":""},{"path":[]},{"path":"/news/index.html","id":"major-changes-2-0-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"dv.manager 2.0.0","text":"Instantiating modules longer done means rlang expression function single argument. Documentation can found argument contains list : unfiltered_dataset: metaReactive list containing tables inside selected dataset filtering . filtered_dataset: metaReactive list containing tables inside selected dataset filtering . url_parameters: reactive list parameters passed url. dataset_name: reactive string containing name selected dataset. module_output: function called returns list values returned different modules indexed module_id. module_names: non-reactive named list containing values names module entries displayed tab names ids module entries used Shiny. utils: list convenience functions: switch2: function allows switching tabs programatically set dispatcher functions facilitate access included. Documentation can found . dv.manager isolates custom CSS styling loaded modules. ensures CSS styles applied intended. dv.manager allows including startup message dv.manager now includes possibility SSO using Azure Active Directory","code":""},{"path":"/news/index.html","id":"minor-changes-2-0-0","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"dv.manager 2.0.0","text":"Data selector disappears , one, dataset passed app. format date presented application now “2021-Jan-01 (UTC)”. size package reduced avoid check notes.","code":""},{"path":"/news/index.html","id":"dvmanager-100","dir":"Changelog","previous_headings":"","what":"dv.manager 1.0.0","title":"dv.manager 1.0.0","text":"modulemanager packages now dv.manager first productive release module manager Easily generates Shiny app simple code Offers UI container Shiny modules developed compatible Acts data dispatcher transparently allows dataset switching filtering Allows bookmarking state generated Shiny app (included modules must compatible feature)","code":""}]
+[{"path":[]},{"path":"/articles/arguments_from_module_manager.html","id":"accessing-the-unfiltered_dataset","dir":"Articles","previous_headings":"Raw access","what":"Accessing the un/filtered_dataset","title":"Arguments from Module Manager","text":"can see wrapper allow us access filtered dataset. creating module list can select tables inside dataset access. Nonetheless, just design choice module developer. See another possible example can also select note reactives call afmm included reactive, afmm[[\"unfiltered_dataset]] afmm[[\"filtered_dataset]] metaReactives, therefore, can accessed inside reactive environment. Also note parenthesis resolving reactive subsetting. differ usual reactive programming. note metaReactives example using simple reactive overwhelm readers experience using shinymeta package. make use export functionality provided modulemanager, reactive replaced shinymeta::metaReactive. Please see vignette(\"export_func_dev\") longer explanation metaReactivity escapes scope vignette.","code":"mod_table <- function(table_name, mod_id) { mod <- list( ui = table_ui, server = function(afmm) { table_server(id = mod_id, dataset = shiny::reactive(afmm[[\"filtered_dataset\"]]()[[table_name]])) }, module_id = mod_id ) mod } data_list <- list( \"D1\" = list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae), \"D2\" = list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) ) module_list <- list( \"Table adsl\" = mod_table(mod_id = \"mod_1\", \"adsl\"), \"Table adae\" = mod_table(mod_id = \"mod_1\", \"adae\") ) run_app( data = data_list, module_list = module_list, filter_data = \"adsl\", filter_key = \"USUBJID\" ) mod_table <- function(table_name, filtered = FALSE, mod_id) { mod <- list( ui = table_ui, server = function(afmm) { if (filtered) { source <- \"filtered_dataset\" } else { source <- \"unfiltered_dataset\" } table_server(id = mod_id, dataset = shiny::reactive(afmm[[source]]()[[table_name]])) }, module_id = mod_id ) mod } data_list <- list(\"D1\" = list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)) module_list <- list( \"Table adsl\" = mod_table(mod_id = \"mod_1\", \"adsl\"), \"Table adae\" = mod_table(mod_id = \"mod_1\", \"adae\") ) run_app( data = data_list, module_list = module_list, filter_data = \"adsl\", filter_key = \"USUBJID\" )"},{"path":"/articles/arguments_from_module_manager.html","id":"accessing-dataset_name","dir":"Articles","previous_headings":"Raw access","what":"Accessing dataset_name","title":"Arguments from Module Manager","text":"Find example access dataset_name Note case manipulate dataset_name therefore included reactive call, can passed “”.","code":"dataset_name_UI <- function(id) { # nolint ns <- shiny::NS(id) shiny::tagList( shiny::textOutput(ns(\"text\")) ) } dataset_name_server <- function(id, dataset_name) { shiny::moduleServer( id, function(input, output, session) { output$text <- shiny::renderText({ dataset_name() }) } ) } mod_dataset_name <- function(module_id) { mod <- list( ui = dataset_name_UI, server = function(afmm) { dataset_name_server(module_id, afmm[[\"dataset_metadata\"]][[\"name\"]]) }, module_id = module_id ) mod } run_app( data = data_list, module_list = list( \"Dataset Name\" = mod_dataset_name(\"mod1\") ), filter_data = \"adsl\", filter_key = \"USUBJID\" )"},{"path":"/articles/arguments_from_module_manager.html","id":"accessing-the-module_output","dir":"Articles","previous_headings":"Raw access","what":"Accessing the module_output","title":"Arguments from Module Manager","text":"afmm[[\"module_output\"]] behavior slightly differs entries afmm list. case function called returns list containing values returned different modules indexed module_id. Returning function call instead list based fact passing argument something yet created, creating list time calling server functions. also forces us wrap afmm[[\"module_output\"]] calls metaReactive/reactive call, regardless object used reactive , need delay evaluation app started. Lets see example . case created module receives value displays . case receive value another module. See , wrap everything reactive, make call module_output resolve reactive subsetted. Note module/app developer treat output value.","code":"com_UI <- function(id, choices = c(1, 2, 3), message) { # nolint ns <- shiny::NS(id) shiny::tagList( shiny::selectizeInput(ns(\"select\"), label = \"Select a number\", choices = choices), shiny::p(message), shiny::textOutput(ns(\"output\")) ) } com_server <- function(id, value) { module <- function(input, output, session) { output$output <- shiny::renderText({ shiny::req(value()) }) return(shiny::reactive(input$select)) } return( shiny::moduleServer( id, module ) ) } mod_com_test <- function(choices, message, value, mod_id) { mod <- list( ui = function(id) { com_UI(id, choices, message) }, server = function(afmm) { com_server(id = mod_id, value = shiny::reactive(afmm[[\"module_output\"]]()[[value]])) }, module_id = mod_id ) mod } run_app( data = list(), module_list = list( \"Send and Receive 1\" = mod_com_test( choices = 1:3, message = \"The other module has selected\", value = \"mod_2\", mod_id = \"mod_1\" ), \"Send and Receive 2\" = mod_com_test( choices = c(\"a\", \"b\", \"c\"), message = \"The other module has selected\", value = \"mod_1\", mod_id = \"mod_2\" ) ), filter_data = \"\" )"},{"path":"/articles/arguments_from_module_manager.html","id":"accessing-util-functions","dir":"Articles","previous_headings":"Raw access","what":"Accessing util functions","title":"Arguments from Module Manager","text":"utils field contains list utility functions actions need module manager. case access simplest cases just list functions.","code":""},{"path":"/articles/arguments_from_module_manager.html","id":"switch2","dir":"Articles","previous_headings":"Raw access > Accessing util functions","what":"switch2","title":"Arguments from Module Manager","text":"switch2 allows switching tab another programmatic manner.","code":"########### Switch module switch_UI <- function(id, name) { # nolint ns <- shiny::NS(id) shiny::tagList( shiny::h1(name), shiny::actionButton(ns(\"switch\"), \"Switch tab\") ) } switch_server <- function(id, selected, switch_func) { shiny::moduleServer( id, function(input, output, session) { shiny::observeEvent(input$switch, { switch_func(selected) }) } ) } mod_switch <- function(name, selected, module_id) { mod <- list( ui = function(module_id) { switch_UI(module_id, name) }, server = function(afmm) { switch_server(module_id, selected, afmm[[\"utils\"]][[\"switch2\"]]) }, module_id = module_id ) mod } run_app( data = list(), module_list = list( \"Mod 1\" = mod_switch(\"Mod 1\", \"Mod 2\", \"mod1\"), \"Mod 2\" = mod_switch(\"Mod 2\", \"Mod 1\", \"mod2\") ), filter_data = \"\", filter_key = \"USUBJID\" )"},{"path":"/articles/arguments_from_module_manager.html","id":"dispatchers","dir":"Articles","previous_headings":"","what":"Dispatchers","title":"Arguments from Module Manager","text":"Module manager inclue couple convenience functions deal nuances described providing uniform accessing fields . Lets see first example. case let mm_resolve_dispatcher take care nuances, including reactive metareactive nature inputs, us. also allows quickly change source without modifying wrapper function. example can quickly change source just changing first parameter dispatcher. even pass argument non related afmm mm_resolve_dispatcher ignore objects come mm_dispatch function. dispatcher also works utils given proper adjustments wrapper:","code":"mod_table <- function(dataset, mod_id) { mod <- list( ui = table_ui, server = function(afmm) { table_server(id = mod_id, dataset = mm_resolve_dispatcher(dataset, afmm)) }, module_id = mod_id ) mod } data_list <- list( \"D1\" = list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae), \"D2\" = list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) ) module_list <- list( \"Table adsl\" = mod_table(mod_id = \"mod_1\", mm_dispatch(\"filtered_dataset\", \"adsl\")), \"Table adae\" = mod_table(mod_id = \"mod_2\", mm_dispatch(\"filtered_dataset\", \"adsl\")) ) run_app( data = data_list, module_list = module_list, filter_data = \"adsl\", filter_key = \"USUBJID\" ) module_list <- list( \"Table adsl\" = mod_table(mod_id = \"mod_1\", mm_dispatch(\"unfiltered_dataset\", \"adsl\")), \"Table adae\" = mod_table(mod_id = \"mod_2\", mm_dispatch(\"module_output\", \"mod_return_table\")), \"Return table\" = mod_return_table(..., mod_id = \"mod_return_table\"), \"Table independent data\" = mod_table(mod_id = \"mod_indp\", mtcars), ) module_list <- list( \"Mod 1\" = mod_switch(\"Mod 1\", \"Mod 2\", mm_dispatch(\"utils\", \"switch2\"), \"mod1\"), \"Mod 2\" = mod_switch(\"Mod 2\", \"Mod 1\", mm_dispatch(\"utils\", \"switch2\"), \"mod2\") )"},{"path":"/articles/css_namespace.html","id":"adding-custom-css-styles-to-a-module","dir":"Articles","previous_headings":"","what":"Adding custom CSS styles to a module","title":"Adding custom CSS styles to a module","text":"multiple ways adding custom CSS styles Shiny module: Inline styles insert style tag level, style attribute insert style head level, style tag external css file Insert style head HTML page Insert style via includeCSS() function call general options can used Shiny applications. See Using custom CSS app Style apps CSS examples -depth explanations. However, purposes working dv.manager recommend using 3rd alternative order avoid CSS leaking (specific CSS style applied parts/modules larger Shiny application unintentionally).","code":"p(style = \"color:red;\", \"Red text\") ui <- fluidPage( tags$head( tags$style(HTML(\" .shiny-input-container { color: #474747; }\")) ) ) ui <- fluidPage( tags$head( tags$link(rel = \"stylesheet\", type = \"text/css\", href = \"custom_file.css\") ) ) ui <- fluidPage( includeCSS(\"www/custom_file.css\") )"},{"path":"/articles/css_namespace.html","id":"add-custom-css-reference-as-an-html-dependency","dir":"Articles","previous_headings":"Adding custom CSS styles to a module","what":"Add custom CSS reference as an HTML dependency","title":"Adding custom CSS styles to a module","text":"Define CSS styles separate file place inside www folder package Inside UI Shiny module, define HTML dependency pointing file options, please check htmltools::htmlDependency() documentation page. Attach dependency variable UI structure. example: options attaching HTML dependency UI element, please consult htmltools::attachDependencies documentation.","code":"ui <- function(id) { dependency <- htmltools::htmlDependency( name = \"custom-package_name_dep\", # use a name that includes your package name, # so it will be easier to debug later version = 1, # for our purposes any value will suffice src = \"/path/to/custom_css_file/\", stylesheet = \"custom.css\", package = \"package_name\" # needed when the src parameter is relative ) dependency } ui <- function(id) { dependency <- htmltools::htmlDependency( # ... ) shiny::tagList( # ..., dependency ) }"},{"path":"/articles/css_namespace.html","id":"css-namespacing-in-module-manager","dir":"Articles","previous_headings":"Adding custom CSS styles to a module","what":"CSS namespacing in module manager","title":"Adding custom CSS styles to a module","text":"Advantages: Custom CSS module dependencies impact module. dv.manager can still change styles modules desired (example custom Shiny theme) However modules impact dv.manager CSS styles even use !important keyword Limitation: approach prevents unintentional CSS style overflow. work JavaScript libraries (like ones contained styling packages: shinydashboard, flexdashboard similar) actively purposefully change overwrite class names CSS styles runtime. Dependency name must begin prefix “custom-” otherwise namespaced.","code":""},{"path":"/articles/customizing_application.html","id":"adding-a-new-module","dir":"Articles","previous_headings":"","what":"Adding a new module","title":"Customizing our application","text":"add new module just add new entry module_list, specifying module want include application. name entry list serve external (.e. human readable) identifier module_id act internal identifier. Notice modified module_id \"mod2\" also name entry list. must unique across modules!","code":"data <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"My Second Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" ) ### Repeated module_id module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"My Second Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ) ) ### Repeated module name module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod2\" ) )"},{"path":"/articles/customizing_application.html","id":"renaming-a-module","dir":"Articles","previous_headings":"","what":"Renaming a module","title":"Customizing our application","text":"want change display module just modify name appropriate entry. want change module named “Second Data table” “Cool-named module”, just change name entry module_list.","code":"data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"Cool-named module\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/customizing_application.html","id":"changing-the-data-source","dir":"Articles","previous_headings":"","what":"Changing the data source","title":"Customizing our application","text":"modify module different data source, just modify dataset parameter. Notice data tables affected filter located sidebar. example contains modules need single dataset. complex modules may need datasets, please refer documentation particular module.","code":"data <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) module_list <- list( \"ADSL data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"ADAE data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adae\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/customizing_application.html","id":"loading-several-datasets-in-a-single-application","dir":"Articles","previous_headings":"","what":"Loading several datasets in a single application","title":"Customizing our application","text":"dv.manager offers possibility accessing several datasets single application. add new dataset just add new entry list passed data parameter. entry can list dataframes, function return list dataframes.","code":"data1 <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) data2 <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) module_list <- list( \"ADSL data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"ADAE data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adae\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list( \"DS1\" = data1, \"DS2\" = data2 ), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/customizing_application.html","id":"data-preprocessing-before-app-is-launched","dir":"Articles","previous_headings":"","what":"Data preprocessing before app is launched","title":"Customizing our application","text":"application limited load data directly. can modify datasets can explore data efficient way. Lets imagine want : limit filtering possibilities just SEX AGE treat SEX factor filtering change labels variables Please visit vignette(\"data_filtering\") understand USUBJID kept within dataset. Notice filter shows selected data, filtering differs depending data type. Please refer dv.filter approach can used , example: reduce number variable presented data table recalculate new variable age months. Notice bottom code block use modified dataset filtering.","code":"data <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) # We will use dplyr to modify our data. # This library has an extensive documentation, # so if you have any particular doubt about the preprocessing itself, # please refer to the documentation of dplyr. library(dplyr) # Create a new filtering dataset data[[\"adsl_filter\"]] <- data[[\"adsl\"]] %>% select(USUBJID, SEX, AGE) %>% mutate(SEX = as.factor(SEX)) # Place new labels attr(data[[\"adsl_filter\"]][[\"SEX\"]], \"label\") <- \"Participant Sex\" attr(data[[\"adsl_filter\"]][[\"AGE\"]], \"label\") <- \"Age (Years)\" module_list <- list( \"ADSL data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"ADAE data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adae\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl_filter\" ) # We have changed the data source for the filtering data <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) library(dplyr) # Create a new filtering dataset data[[\"adsl_mod\"]] <- data[[\"adsl\"]] %>% select(USUBJID, SEX, AGE) %>% mutate( SEX = as.factor(SEX), AGE_M = AGE * 12 ) # Place new labels attr(data[[\"adsl_mod\"]][[\"SEX\"]], \"label\") <- \"Participant Sex\" attr(data[[\"adsl_mod\"]][[\"AGE_M\"]], \"label\") <- \"Age (Months)\" module_list <- list( \"ADSL data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ), \"ADSL_mod data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl_mod\"), module_id = \"mod2\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl_mod\" ) # We have changed the data source for the filtering"},{"path":"/articles/developing_module.html","id":"developing-a-new-module","dir":"Articles","previous_headings":"","what":"Developing a new module","title":"Developing a new module","text":"Developing modules compatible dv.manager follow similar process developing pure Shiny. consideration must : programming module, must include “wrapper” function compatible dv.manager requirements. can think adapter module plays nicely . requirements explained vignette. dv.manager prepared work ADAM SDTM datasets filtered using common key across datasets specified user, default “USUBJID”, see vignette(\"data_filtering\").","code":""},{"path":"/articles/developing_module.html","id":"program-a-module-with-shiny","dir":"Articles","previous_headings":"Developing a new module","what":"1. Program a module with Shiny","title":"Developing a new module","text":"First program Shiny module usual way (see: Modularizing Shiny app code): example, create module displays number rows data set well number unique entries variable selected user drop-menu. course, module useful, purposes explaining dv.manager works, suffice. code chunk , notice wrap data set reactive expression, done module expect dataset reactive value. case inside module.manager. run module application without using dv.manager.","code":"library(shiny) module_ui <- function(id, column_names) { ns <- NS(id) # this line is standard in all shiny modules tagList( textOutput(ns(\"num_rows\")), selectInput(ns(\"col_select\"), \"Select a column\", choices = column_names), textOutput(ns(\"num_unique\")), ) } module_server <- function(id, dataset) { module <- function(input, output, session) { output$num_rows <- renderText({ paste(\"Number of rows:\", nrow(dataset())) }) output$num_unique <- renderText({ paste( \"There are\", length(unique(dataset()[[input$col_select]])), \"unique values in\", input$col_select ) }) } return( moduleServer(id, module) ) } dataset <- pharmaverseadam::adsl ui <- fluidPage( module_ui(\"my_module\", names(dataset)) ) server <- function(input, output, session) { module_server( \"my_module\", reactive(dataset) ) } shinyApp(ui, server)"},{"path":"/articles/developing_module.html","id":"wrap-this-module","dir":"Articles","previous_headings":"Developing a new module","what":"2. Wrap this module","title":"Developing a new module","text":"use module inside dv.manager must first wrap function receive: parameters needed start module module id return list following fields: ui: function invoked create UI server: one argument function call module server module_id name function mod_uniq_values indicate module . function defined server element later evaluated module manager receive set arguments defined explained vignette(\"arguments_from_module_manager\"). Also notice dv.manager provides us dv.filter left-hand side module selection bar top. come standard every application created using dv.manager.","code":"mod_uniq_values <- function(table_name, column_names, module_id) { mod <- list( # UI function ui = function(mod_id) { module_ui(mod_id, column_names) }, # Server function server = function(afmm) { module_server( module_id, dataset = reactive(afmm[[\"filtered_dataset\"]]()[[table_name]]) ) }, # Module ID module_id = module_id ) return(mod) } dataset <- list(adsl = pharmaverseadam::adsl) module_list <- list(\"First module\" = mod_uniq_values( \"adsl\", c(\"USUBJID\", \"AGE\"), module_id = \"mod1\" )) dv.manager::run_app( data = list(\"DS\" = dataset), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/developing_module.html","id":"an-alternative-way-of-developing-this-example-module","dir":"Articles","previous_headings":"","what":"An alternative way of developing this example module","title":"Developing a new module","text":"can pass one data set, list module update inputs UI based list. Notice case, parameter UI function ID. selectInput UI elements defined, choices option specified. choices updated run-time server function. , two observeEvent functions added update choices input. first update names dataset_list. second update names columns selected data set. two observeEvent added update choices input : names dataset_list names columns selected dataset Next, modify wrapper allows example module used dv.manager. First, remove extra parameter UI function. Notice allows us directly pass function name instead wrapping anonymous function (see previous example). , pass whole filtered_dataset list dataset parameter server function longer specifying just one data set - way, can allow user select data set inside application run-time. allows us remove parameters mod_uniq_values() function definition exception module_id. Finally, set dv.manager similar way, now modified call module_list added new data set data set list. Please, notice module resets interface whenever change data table. occurs observe change dataset. different technique, escapes scope vignette, used control issue.","code":"library(shiny) module_ui <- function(id) { ns <- NS(id) tagList( textOutput(ns(\"num_rows\")), selectInput(ns(\"data_select\"), \"Select a dataset\", choices = NULL), selectInput(ns(\"col_select\"), \"Select a column\", choices = NULL), textOutput(ns(\"num_unique\")), ) } module_server <- function(id, dataset_list) { module <- function(input, output, session) { observeEvent(dataset_list(), { updateSelectInput( inputId = \"data_select\", choices = names(dataset_list()) ) }, once = TRUE ) observeEvent(input$data_select, { updateSelectInput( inputId = \"col_select\", choices = names(dataset_list()[[input$data_select]]) ) }) output$num_rows <- renderText({ paste( \"Number of rows:\", nrow(dataset_list()[[input$data_select]][[input$col_select]]) ) }) output$num_unique <- renderText({ paste( \"There are\", length(unique(dataset_list()[[input$data_select]][[input$col_select]])), \"unique values in\", input$col_select ) }) } return( moduleServer(id, module) ) } # Now, only the module_id parameter is needed mod_uniq_values <- function(module_id) { mod <- list( ui = module_ui, server = function(afmm) { module_server( module_id, dataset = afmm[[\"filtered_dataset\"]] ) }, module_id = module_id ) mod } datasets <- list( adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae ) module_list <- list( \"Row counter\" = mod_uniq_values(module_id = \"mod1\") ) dv.manager::run_app( data = list(\"DS1\" = datasets), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/dv-manager.html","id":"data-loading","dir":"Articles","previous_headings":"","what":"Data loading","title":"Getting started","text":"dv.manager developed work DaVinci modules whose main purpose explore clinical trial data. main input modules data loaded SDTM ADAM datasets. use two dummy datasets dv.manager illustration purposes. Notice datasets packed together single list.","code":"data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae)"},{"path":"/articles/dv-manager.html","id":"preprocessing-the-data-optional","dir":"Articles","previous_headings":"","what":"Preprocessing the data (optional)","title":"Getting started","text":"can optionally preprocess loaded data : computing derived variables, rename variables, select subset variables subset population,…","code":""},{"path":"/articles/dv-manager.html","id":"module-selection","dir":"Articles","previous_headings":"","what":"Module selection","title":"Getting started","text":"Now, select modules included application. mentioned , dv.manager contain modules, therefore install dv.listings package (see install dv.listings modules : vignette(\"installing_module_packages\")). already dv.listings installed can skip step. can now include application modules included dv.listings package. example, can use data table dv.listings package. Please notice dataset parameter directly pass dataset (e.g. data.frame tibble), just string indicating datasets loaded want display table. Please refer vignettes `vignette(“how_does_work”)` explanation data dispatched different modules.","code":"# TODO if (!require(\"remotes\")) install.packages(\"remotes\") remotes::install_github(\"Boehringer-Ingelheim/dv.listings\") module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ) )"},{"path":"/articles/dv-manager.html","id":"launching-our-first-application","dir":"Articles","previous_headings":"","what":"Launching our first application","title":"Getting started","text":"launch application now just need call run_app function dv.manager.","code":"dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" )"},{"path":"/articles/how_does_work.html","id":"anatomy-of-davinci-modules","dir":"Articles","previous_headings":"","what":"Anatomy of DaVinci Modules","title":"How does it work (Technic/Develop)","text":"Opposed pure Shiny modules, DaVinci modules defined single call one created main example documentation. modules simple wrappers around pure Shiny modules return list containing: UI function single argument, shiny id. function single parameter call server function. module ID, act way ID pure shiny modules. See example simple module","code":"data <- list(adsl = pharmaverseadam::adsl, adae = pharmaverseadam::adae) module_list <- list( \"My First Data table\" = dv.listings::mod_data_table( dataset = dv.manager::mm_dispatch(\"filtered_dataset\", \"adsl\"), module_id = \"mod1\" ) ) dv.manager::run_app( data = list(\"DS\" = data), module_list = module_list, filter_data = \"adsl\" ) table_UI <- function(id) { # nolint ns <- shiny::NS(id) shiny::tagList( DT::DTOutput(ns(\"table\")) ) } table_server <- function(id, dataset) { shiny::moduleServer( id, function(input, output, session) { output$table <- DT::renderDT( { dataset() }, selection = \"single\" ) returned_rows <- shiny::reactive({ shiny::req(!is.null(input$table_rows_selected)) dataset()[[input$table_rows_selected, \"USUBJID\"]] }) return(returned_rows) } ) } mod_table <- function(dataset, mod_id, table_name) { mod <- list( ui = function(id) { table_UI(id) }, server = function(afmm) { table_server( id = mod_id, dataset = shiny::reactive(afmm[[\"filtered_dataset\"]]())[[table_name]] ) }, module_id = mod_id ) mod }"},{"path":"/articles/how_does_work.html","id":"an-explanation-of-the-code-above","dir":"Articles","previous_headings":"Anatomy of DaVinci Modules","what":"An explanation of the code above:","title":"How does it work (Technic/Develop)","text":"relevant part module server entry list returned module function: function single argument. See vignette(\"arguments_from_module_manager\") longer explanation topic.","code":""},{"path":"/articles/logging.html","id":"how-to-use-it","dir":"Articles","previous_headings":"","what":"How to use it","title":"logging","text":"can start using logger simply activating sending message. default state, logger capture decorate ‘message’ ‘warning’ condition. Simply put, message send using message, warning, rlang::inform rlang::warn. Usually favour rlang functions adding fields use logger simpler.","code":"dv.manager::log_activate() rlang::inform(\"Logged message\") dv.manager::log_deactivate()"},{"path":"/articles/logging.html","id":"using-logging-levels","dir":"Articles","previous_headings":"","what":"Using logging levels","title":"logging","text":"logger can different print granularities depending logging level selected. different level can specified logging messages sent including logging level field . logging levels numerical value can checked :","code":"dv.manager::log_activate(dv.manager:::log_default_handlers(level = \"info\")) rlang::inform(\"This will be printed\", level = \"info\") rlang::inform(\"This will not\", level = \"debug\") dv.manager::log_deactivate() dv.manager::log_get_levels()"},{"path":"/articles/logging.html","id":"logging-messages-sent-from-your-module","dir":"Articles","previous_headings":"","what":"Logging messages sent from your module","title":"logging","text":"common use case using logger send messages inside module. can include package name argument send message. can done simple way using rlang can use packageName function dynamically get name package. can also call log_use_log dv.manager root package containing module. add file R/ directory two convenience functions automatically add package name.","code":"dv.manager::log_activate() rlang::inform(\"An inform with package name\", package = \"my_package\") dv.manager::log_deactivate() # Will create an R/utils_logging.R file with two convenience functions dv.manager::log_use_log() devtools::load_all() dv.manager::log_activate() log_inform(\"An inform with package name\") log_warning(\"A warning with package name\") dv.manager::log_deactivate()"},{"path":"/articles/logging.html","id":"advanced-logging","dir":"Articles","previous_headings":"","what":"Advanced logging","title":"logging","text":"dv.manager logging system based R’s condition system. logging system simply specifies set globalCallingHandlers capture log messages, warnings /errors specified handlers.","code":""},{"path":"/articles/logging.html","id":"the-default-handlers","dir":"Articles","previous_headings":"Advanced logging","what":"The default handlers","title":"logging","text":"low level logging makes flexible. default, condition contain fields standard rlang::inform rlang::warn important: message: [character(1)] message logged expects module developer added fields: package: [character(1)] name package sent condition (added automatically log_info log_warn used). level: [numeric(1)] level logging granularity. handlers try add following fields condition formatting: date: [character(1)] timestamp message. ns: [character(1)] namespace module sent condition. sess_id: [character(1)] Shiny session id sent condition. short_sess_id: [character(1)] truncated version sess_id improve human-readibility. default handlers present format information. log_add* functions add extra fields condition can used later log_format() create logging message. print messages use cli package. log_format function convenience function allows quick formatting condition. allows using glue-like string parameters fields condition. field used format present NA value returned instead.","code":"library(magrittr) log_default_handlers <- function(level = 999) { format_str <- \"[{date}][{package}|{short_sess_id}|{ns}]:{message}\" cnd_to_str <- function(cnd) { cnd %>% dv.manager::log_add_date() %>% dv.manager::log_add_ns() %>% dv.manager::log_add_sess_id() %>% dv.manager::log_add_short_sess_id() %>% dv.manager::log_format(format_str) } list( message = function(cnd) { if (dv.manager::log_check_print(cnd, level)) cli::cli_alert_info(cnd_to_str(cnd)) rlang::cnd_muffle(cnd) }, warning = function(cnd) { if (dv.manager::log_check_print(cnd, level)) cli::cli_alert_warning(cnd_to_str(cnd)) rlang::cnd_muffle(cnd) } ) }"},{"path":"/articles/logging.html","id":"creating-custom-handlers","dir":"Articles","previous_headings":"Advanced logging","what":"Creating custom handlers","title":"logging","text":"default handlers convenient, logging behavior can modified using different set handlers… can see can add new fields logging, can supress messages depending fields, etc. allows filtering logging messages package, session, logging level, etc. adapts particular need development.","code":"library(magrittr) my_handlers <- function() { format_str <- \"Date:{date}|Pkg:{package}|{custom_field}:{message}\" cnd_to_str <- function(cnd) { cnd %>% dv.manager::log_add_date() %>% dv.manager::log_format(format_str) } list( message = function(cnd) { if (cnd[[\"print_me\"]]) cli::cli_alert_info(cnd_to_str(cnd)) rlang::cnd_muffle(cnd) }, warning = function(cnd) { cli::cli_alert_warning(cnd_to_str(cnd)) rlang::cnd_muffle(cnd) } ) } dv.manager::log_activate(my_handlers()) dv.manager:::log_inform(\"I will print this and its custom_field will be 1\", print_me = TRUE, custom_field = \"1\") dv.manager:::log_inform(\"I will print this and its custom_field will be NA\", print_me = TRUE) dv.manager:::log_inform(\"I will not print this\", print_me = FALSE) dv.manager::log_deactivate()"},{"path":"/articles/logging.html","id":"troubleshooting","dir":"Articles","previous_headings":"","what":"Troubleshooting","title":"logging","text":"log_activate called, error similar following appears: Error globalCallingHandlers(…) : called handlers stack error means activating logger environment already defined calling handlers, usually withCallingHandlers. shiny particular app starts, therefore activate logging inside application. logger based setting globalCallingHandlers setting tricky within functions. recommendation make call log_activate root session within functions.","code":""},{"path":"/articles/manager_utils.html","id":"switch_tab-utility","dir":"Articles","previous_headings":"","what":"switch_tab utility","title":"dv.manager Utilities","text":"function allows developer switch another module within module. include example app.","code":"# - name: a title to display inside the module # - id: shiny id switch_ui <- function(id, name) { ns <- shiny::NS(id) shiny::tagList( shiny::h1(name), shiny::actionButton(ns(\"switch\"), \"Switch tab\") ) } # - id the shiny module id # - selected The name of the tab that we want to switch to # - switch_func the switching function switch_server <- function(id, selected, switch_func) { shiny::moduleServer( id, function(input, output, session) { shiny::observeEvent(input$switch, { switch_func(selected) }) } ) } # - name A title that will be shown inside the module # - selected The name of the tab that we want to switch to # - module_id shiny module ID mod_switch <- function(name, selected, module_id) { mod <- list( ui = function(module_id) { switch_ui(module_id, name) }, server = function(afmm) { switch_server(module_id, selected, afmm[[\"utils\"]][[\"switch_function\"]]) }, module_id = module_id ) mod } app <- function() { dv.manager::run_app( data = list(), module_list = list( \"Mod 1\" = mod_switch( name = \"Mod 1\", # Note that in this case we make reference to the name of the entry in the list and not to the module_id. # This functionality is based on updateTabsetpanel that works with the tab titles. selected = \"Mod 2\", module_id = \"mod1\" ), \"Mod 2\" = mod_switch( name = \"Mod 2\", selected = \"Mod 1\", module_id = \"mod2\" ) ), filter_data = \"\", filter_key = \"\" ) } app()"},{"path":"/articles/passing_data.html","id":"important-note","dir":"Articles","previous_headings":"","what":"IMPORTANT NOTE","title":"Passing data between modules","text":"element returned, afmm[[\"module_output\"]]()[[selection]] reactive, must transformed reactive (usually metaReactive) wrapper metaReactive(afmm[[\"module_output\"]]()[[selection]]). done way moment modules invoked, module_output exist yet value retrieved server functions run variable exists inside app_server environment.","code":""},{"path":"/articles/timestamp.html","id":"data-timestamp","dir":"Articles","previous_headings":"","what":"Data timestamp","title":"Add timestamp to app data","text":"dv.manager shows last time modification data used application. checks meta attribute datasets loaded app. Specifically, expects meta list entry mtime contains POSIXct date time. Usually, dv.loader sets attribute automatically loading data action needed. Nonetheless, data modified loading, attribute deleted cases, see example , necessary keep track reset needed.","code":"data <- list( dummy = list( adsl = tibble::tibble( USUBJID = c(1, 2, 3), AGE = c(1, 2, 3) ) ) ) # This attribute is automatically set when using dv.loader attr(data[[\"dummy\"]][[\"adsl\"]], \"meta\") <- list(mtime = as.POSIXct(\"2023-02-28 12:00:00 CET\")) # This app shows the date specified in the previous step. dv.manager::run_app( data = data, module_list = list(), filter_data = \"adsl\" ) data <- list( dummy = list( adsl = tibble::tibble( USUBJID = c(1, 2, 3), AGE = c(1, 2, 3) ) ) ) # Normally set by dv.loader attr(data[[\"dummy\"]][[\"adsl\"]], \"meta\") <- list(mtime = as.POSIXct(\"2023-02-28 12:00:00 CET\")) adsl2 <- tibble::tibble( USUBJID = c(1, 2, 3), COUNTRY = c(\"A\", \"B\", \"C\") ) # Save the date of the original dataset adsl_date <- attr(data[[\"dummy\"]][[\"adsl\"]], \"meta\") # Attribute is lost by the left_join data[[\"dummy\"]][[\"adsl\"]] <- dplyr::left_join(adsl2, data[[\"dummy\"]][[\"adsl\"]]) # Reset date attribute afterwards attr(data[[\"dummy\"]][[\"adsl\"]], \"meta\") <- adsl_date dv.manager::run_app( data = data, module_list = list(), filter_data = \"adsl\" )"},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Boehringer-Ingelheim Pharma GmbH & Co.KG. Copyright holder, funder. Sorin Voicu. Author. Luis Morís Fernández. Maintainer, author.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Voicu S, Morís Fernández L (2024). dv.manager: DaVinci Module Manager. R package version 2.1.1.","code":"@Manual{, title = {dv.manager: DaVinci Module Manager}, author = {Sorin Voicu and Luis {Morís Fernández}}, year = {2024}, note = {R package version 2.1.1}, }"},{"path":"/index.html","id":"dvmanager","dir":"","previous_headings":"","what":"Build complex Shiny apps in a simple way","title":"Build complex Shiny apps in a simple way","text":"dv.manager package designed make quick easy create deploy Shiny applications using modules DaVinci.","code":""},{"path":"/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Build complex Shiny apps in a simple way","text":"","code":"if (!require(\"remotes\")) install.packages(\"remotes\") remotes::install_github(\"Boehringer-Ingelheim/dv.manager\")"},{"path":"/reference/add_date_range.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a date_range attribute to a dataset — add_date_range","title":"Add a date_range attribute to a dataset — add_date_range","text":"function add attribute date_range dataset. source dates mtime (POSIXct) entry meta attribute provided dv.loader. different domains contained list single dataset, attribute contain minimum maximum modification date domains dataset. See vignette(\"customizing_application\")","code":""},{"path":"/reference/add_date_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a date_range attribute to a dataset — add_date_range","text":"","code":"add_date_range(dataset)"},{"path":"/reference/add_date_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a date_range attribute to a dataset — add_date_range","text":"dataset dataset loaded dv.loader","code":""},{"path":"/reference/add_date_range.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add a date_range attribute to a dataset — add_date_range","text":"case entries dataset expected attribute, show warning.","code":""},{"path":"/reference/app_server.html","id":null,"dir":"Reference","previous_headings":"","what":"Server side of the dv.manager — app_server","title":"Server side of the dv.manager — app_server","text":"Server side dv.manager","code":""},{"path":"/reference/app_server.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Server side of the dv.manager — app_server","text":"","code":"app_server(input = NULL, output = NULL, session = NULL)"},{"path":"/reference/app_server.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Server side of the dv.manager — app_server","text":"input, output, session Internal parameters shiny. REMOVE. id id app_server used module","code":""},{"path":"/reference/app_server.html","id":"data","dir":"Reference","previous_headings":"","what":"data","title":"Server side of the dv.manager — app_server","text":"data fundamental data source application launched dv.manager data source named list : lists data.frames loaded dv.loader functions called return list data.frames Entries list selected data.frames dispatched module according code defines application data dispatched modules filtered according global dv.filter (see filter_data section) name selected dataset appear sidebar, according name provided list date dataset automatically displayed selecting earliest latest date composing data.frames. dv.manager assumes data.frames within dataset attribute meta, within , look entry mtime assumption met dataset loaded directly dv.loader, nonetheless, attributes may need created new derived data.frames preprocessing programmer obligation check datasets attribute correct.","code":""},{"path":"/reference/app_server.html","id":"filter-data","dir":"Reference","previous_headings":"","what":"filter_data","title":"Server side of the dv.manager — app_server","text":"datasets data filtered following way: dataset global filtering defined filter_data dataset filtered dv.filter user input remaining USUBJIDs (default, see filter_key field run_app) used filter rest datasets","code":""},{"path":"/reference/app_server.html","id":"module-list","dir":"Reference","previous_headings":"","what":"module_list","title":"Server side of the dv.manager — app_server","text":"module_list contain list modules used application. entry list contain following fields: name entry list (unique), used selection menus, therefore must meaningful intended human use. ui: UI function need single parameter, id. Almost always entry module_id server: function receive single parameter. See vignette(\"arguments_from_module_manager\") module_id: unique alphanumeric string identify module, used internally therefore intended machine use. Additionally, expect value input$mod_select identify module currently selected. used produce log selection used selecting UI conditional panels.","code":""},{"path":"/reference/app_ui.html","id":null,"dir":"Reference","previous_headings":"","what":"The application User-Interface using an HTML template — app_ui","title":"The application User-Interface using an HTML template — app_ui","text":"application User-Interface using HTML template","code":""},{"path":"/reference/app_ui.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The application User-Interface using an HTML template — app_ui","text":"","code":"app_ui(id)"},{"path":"/reference/app_ui.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The application User-Interface using an HTML template — app_ui","text":"id parameter can either string id app_ui used module request app_ui used standalone application becomes Internal parameter {shiny} REMOVE.","code":""},{"path":"/reference/build_secure_arguments.html","id":null,"dir":"Reference","previous_headings":"","what":"Securize an application using an Azure — build_secure_arguments","title":"Securize an application using an Azure — build_secure_arguments","text":"Securize application using Azure","code":""},{"path":"/reference/build_secure_arguments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Securize an application using an Azure — build_secure_arguments","text":"","code":"build_secure_arguments(azure_options, app_ui, app_server)"},{"path":"/reference/build_secure_arguments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Securize an application using an Azure — build_secure_arguments","text":"azure_options named vector/list containing options Azure Authentication: Required fields: redirect, resource, tenant, app, version, password. See AzureAuth::build_authorization_uri . NULL application secure. Note azure_options required applications handles authentication . required environments POSIT Connect environments authentication handled externally. app_ui, app_server shiny ui server functions","code":""},{"path":"/reference/build_secure_arguments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Securize an application using an Azure — build_secure_arguments","text":"list entries ui_func srv_func options contains securized version app.","code":""},{"path":"/reference/get_date_range.html","id":null,"dir":"Reference","previous_headings":"","what":"Return a range of dates — get_date_range","title":"Return a range of dates — get_date_range","text":"Calculates range dates list POSIXct objects. entries NULL show warning indicating entries NULL. entries date object throw error.","code":""},{"path":"/reference/get_date_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return a range of dates — get_date_range","text":"","code":"get_date_range(x)"},{"path":"/reference/get_date_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return a range of dates — get_date_range","text":"x list date objects","code":""},{"path":"/reference/get_date_range.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return a range of dates — get_date_range","text":"character vector two entries, first last date input vector.","code":""},{"path":"/reference/has_all_items_named.html","id":null,"dir":"Reference","previous_headings":"","what":"tests if all elements of a list are named — has_all_items_named","title":"tests if all elements of a list are named — has_all_items_named","text":"true elements name length(0).","code":""},{"path":"/reference/has_all_items_named.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tests if all elements of a list are named — has_all_items_named","text":"","code":"has_all_items_named(x)"},{"path":"/reference/has_all_items_named.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"tests if all elements of a list are named — has_all_items_named","text":"x list tested","code":""},{"path":"/reference/import_from.html","id":null,"dir":"Reference","previous_headings":"","what":".data from dplyr — .data","title":".data from dplyr — .data","text":".data dplyr","code":""},{"path":"/reference/include_css.html","id":null,"dir":"Reference","previous_headings":"","what":"Include CSS files from path /inst/css/ — include_css","title":"Include CSS files from path /inst/css/ — include_css","text":"Imports custom CSS files","code":""},{"path":"/reference/include_css.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include CSS files from path /inst/css/ — include_css","text":"","code":"include_css(pattern = \"*\")"},{"path":"/reference/include_css.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include CSS files from path /inst/css/ — include_css","text":"pattern Default search file pattern","code":""},{"path":"/reference/include_js.html","id":null,"dir":"Reference","previous_headings":"","what":"Include JS files from path /inst/js/ — include_js","title":"Include JS files from path /inst/js/ — include_js","text":"Imports custom JS files","code":""},{"path":"/reference/include_js.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include JS files from path /inst/js/ — include_js","text":"","code":"include_js(pattern = \"*\")"},{"path":"/reference/include_js.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include JS files from path /inst/js/ — include_js","text":"pattern Default search file pattern","code":""},{"path":"/reference/log_with_logging_handlers.html","id":null,"dir":"Reference","previous_headings":"","what":"globalCallinHandlers do not capture the output of UI and Server for some reason therefore\nspecific with handlers are applied to them\nBecause there is no easy way of passing those handlers we use an option to pass those. — log_with_logging_handlers","title":"globalCallinHandlers do not capture the output of UI and Server for some reason therefore\nspecific with handlers are applied to them\nBecause there is no easy way of passing those handlers we use an option to pass those. — log_with_logging_handlers","text":"globalCallinHandlers capture output UI Server reason therefore specific handlers applied easy way passing handlers use option pass .","code":""},{"path":"/reference/log_with_logging_handlers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"globalCallinHandlers do not capture the output of UI and Server for some reason therefore\nspecific with handlers are applied to them\nBecause there is no easy way of passing those handlers we use an option to pass those. — log_with_logging_handlers","text":"","code":"log_with_logging_handlers(fnc)"},{"path":"/reference/logging.html","id":null,"dir":"Reference","previous_headings":"","what":"logger — logging","title":"logger — logging","text":"article refers functions used logger. Please refer vignette(\"logging\").","code":""},{"path":"/reference/logging.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"logger — logging","text":"","code":"log_activate(h = log_default_handlers(), .rm_gh = TRUE) log_deactivate(h, .rm_gh = TRUE) log_default_handlers(level = 999) log_add_date(cnd) log_add_short_sess_id(cnd) log_test_level(cnd, level, .default = TRUE) log_format(cnd, ...) log_add_sess_id(cnd) log_add_ns(cnd) log_get_level_list() log_use_log()"},{"path":"/reference/logging.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"logger — logging","text":"h [function(0+)] named list functions manage signaled conditions .rm_gh [logical(1)] Remove previous globalCallingHandlers? level [character(1)|numeric(1)] Logging level cnd [condition(1)] condition .default [logical(1)] default behavior level found condition ... parameter passed glue","code":""},{"path":"/reference/logging.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"logger — logging","text":"removes previous globalCallingHandlers default","code":""},{"path":"/reference/logging.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"logger — logging","text":"log_activate(): Activate logging log_deactivate(): deactivate logging log_default_handlers(): get default handlers log_add_date(): add date field condition log_add_short_sess_id(): add short_sess_id condition log_test_level(): Tests cnd level lower logger level log_format(): creates log string according format. log_add_sess_id(): add sess_id condition log_add_ns(): add ns condition log_get_level_list(): List levels logger log_use_log(): Adds utils_logging file package","code":""},{"path":"/reference/mm_dispatch.html","id":null,"dir":"Reference","previous_headings":"","what":"Functional dispatcher helper functions — mm_dispatch","title":"Functional dispatcher helper functions — mm_dispatch","text":"Dispatch helper function allows accessing data utility functions inside module manager dynamic way.","code":""},{"path":"/reference/mm_dispatch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functional dispatcher helper functions — mm_dispatch","text":"","code":"mm_dispatch(from, selection = character(0))"},{"path":"/reference/mm_dispatch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functional dispatcher helper functions — mm_dispatch","text":"string indicating structure want access inside module manager selection optional subsetting within selected data structure","code":""},{"path":"/reference/mm_dispatch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functional dispatcher helper functions — mm_dispatch","text":"parameter can take following values: unfiltered_dataset filtered_dataset url_parameters module_output utils","code":""},{"path":[]},{"path":"/reference/mm_dispatch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functional dispatcher helper functions — mm_dispatch","text":"","code":"mm_dispatch(\"unfiltered_dataset\", \"adsl\") #> $from #> [1] \"unfiltered_dataset\" #> #> $selection #> [1] \"adsl\" #> #> attr(,\"class\") #> [1] \"mm_dispatcher\" mm_dispatch(\"utils\", \"switch2\") #> $from #> [1] \"utils\" #> #> $selection #> [1] \"switch2\" #> #> attr(,\"class\") #> [1] \"mm_dispatcher\""},{"path":"/reference/mm_resolve_dispatcher.html","id":null,"dir":"Reference","previous_headings":"","what":"Dispatcher resolver — mm_resolve_dispatcher","title":"Dispatcher resolver — mm_resolve_dispatcher","text":"Dispatcher resolver","code":""},{"path":"/reference/mm_resolve_dispatcher.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dispatcher resolver — mm_resolve_dispatcher","text":"","code":"mm_resolve_dispatcher(dispatcher, afmm, flatten = FALSE)"},{"path":"/reference/mm_resolve_dispatcher.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dispatcher resolver — mm_resolve_dispatcher","text":"dispatcher list class \"mm_dispatcher\" resolved. object class returned unmodified. afmm list arguments module manager flatten dispatcher selection length 1 disppatcher class \"mm_dispatcher\" return first element instead one element list. default, try flatten . selection greater 1 flatten must FALSE, otherwise error thrown.","code":""},{"path":[]},{"path":"/reference/mod_simple.html","id":null,"dir":"Reference","previous_headings":"","what":"A simple module that counts the number of rows — simple_UI","title":"A simple module that counts the number of rows — simple_UI","text":"simple module used demonstration purposes documentation","code":""},{"path":"/reference/mod_simple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A simple module that counts the number of rows — simple_UI","text":"","code":"simple_UI(id) simple_server(id, dataset) mod_simple(dataset, module_id)"},{"path":"/reference/mod_simple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A simple module that counts the number of rows — simple_UI","text":"id shiny id dataset input dataset module_id shiny module ID","code":""},{"path":"/reference/mod_simple.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"A simple module that counts the number of rows — simple_UI","text":"simple_UI(): Module UI simple_server(): Module server","code":""},{"path":"/reference/mod_switch.html","id":null,"dir":"Reference","previous_headings":"","what":"A module that allows switching to another module — switch_UI","title":"A module that allows switching to another module — switch_UI","text":"simple module used demonstration purposes documentation","code":""},{"path":"/reference/mod_switch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A module that allows switching to another module — switch_UI","text":"","code":"switch_UI(id, name) switch_server(id, selected, switch_func) mod_switch(name, selected, switch_func, module_id)"},{"path":"/reference/mod_switch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A module that allows switching to another module — switch_UI","text":"id shiny module id+ name title shown inside module selected name tab want switch switch_func function passed name tab switches focus module_id shiny module ID","code":""},{"path":"/reference/mod_switch.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"A module that allows switching to another module — switch_UI","text":"switch_UI(): Module UI switch_server(): Module server","code":""},{"path":"/reference/ns_css.html","id":null,"dir":"Reference","previous_headings":"","what":"Namespaces the CSS dependency of a {shiny} tag — ns_css","title":"Namespaces the CSS dependency of a {shiny} tag — ns_css","text":"default scope CSS styles global. means certain CSS style applied across HTML page. presents problems one module styles override another module styles.","code":""},{"path":"/reference/ns_css.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Namespaces the CSS dependency of a {shiny} tag — ns_css","text":"","code":"ns_css( module = NULL, disable_css_namespacing = isTRUE(getOption(\"dv.manager.disable_css_namespacing\")) )"},{"path":"/reference/ns_css.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Namespaces the CSS dependency of a {shiny} tag — ns_css","text":"module {shiny} module disable_css_namespacing disables css namespacing returns input module unmodified","code":""},{"path":"/reference/ns_css.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Namespaces the CSS dependency of a {shiny} tag — ns_css","text":"Namespacing CSS addresses issue creating special tags isolate effect CSS namespace. particular cases, css namespacing can create interactions modules. disabling flag included rare cases. flag can passed explicitly take default value options(\"dv.manager.disable_css_namespacing\"). detail every module developer uses custom css consider defining custom dependency via {htmltools::htmlDependency} name dependency start custom-. examples pleasee see vigniette.","code":""},{"path":"/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator from dplyr — %>%","title":"Pipe operator from dplyr — %>%","text":"Pipe operator dplyr","code":""},{"path":"/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator from dplyr — %>%","text":"","code":"lhs %>% rhs"},{"path":"/reference/run_app.html","id":null,"dir":"Reference","previous_headings":"","what":"Run the Shiny Application — run_app","title":"Run the Shiny Application — run_app","text":"function serves entry point applications created user.","code":""},{"path":"/reference/run_app.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run the Shiny Application — run_app","text":"","code":"run_app( data = NULL, module_list = list(), title = \"Untitled\", filter_data = NULL, filter_key = if (!is.null(data)) { \"USUBJID\" } else { NULL }, startup_msg = NULL, azure_options = NULL, reload_period = NULL, enableBookmarking = \"server\", .launch = TRUE )"},{"path":"/reference/run_app.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run the Shiny Application — run_app","text":"data list datasets used Shiny application. data parameter can defined : named list lists lists list data.frames. lists data.frames contains domain, structure similar returned dv.loader::load_data call. named list functions functions return list data.frames. module_list list modules included Shiny application title title displayed browser tab filter_data string indicating loaded datasets used filtering. filter_key string specifying common field across datasets used expand filtering. Default = \"USUBJID\" NULL data = NULL startup_msg message displayed start application. can either NULL modal message defined shiny::modalDialog. azure_options named vector/list containing options Azure Authentication: Required fields: redirect, resource, tenant, app, version, password. See AzureAuth::build_authorization_uri . NULL application secure. Note azure_options required applications handles authentication . required environments POSIT Connect environments authentication handled externally. reload_period Either lubridate object specify duration positive numeric value interpreted lubridate duration object days. default NULL enableBookmarking Can one \"url\", \"server\", \"disable\". default value, NULL, respect setting previous calls enableBookmarking(). See enableBookmarking() information bookmarking app. .launch default always TRUE. false debugging testing. TRUE return app. FALSE return options app launched.","code":""},{"path":"/news/index.html","id":"dvmanager-211-9000","dir":"Changelog","previous_headings":"","what":"dv.manager 2.1.1-9000","title":"dv.manager 2.1.1-9000","text":"Removes golem dependency","code":""},{"path":"/news/index.html","id":"dvmanager-211","dir":"Changelog","previous_headings":"","what":"dv.manager 2.1.1","title":"dv.manager 2.1.1","text":"General code housekeeping Move tests shinytest shinytest2","code":""},{"path":"/news/index.html","id":"dvmanager-210","dir":"Changelog","previous_headings":"","what":"dv.manager 2.1.0","title":"dv.manager 2.1.0","text":"dispatchers now include flatten argument. selection length 1 flattens list TRUE. selection length greater 1 flatten must FALSE. Passing expressions using sessionuserDatamanager_utils$switch_tab now defunct \"server\" bookmarking selected app running shiny-server refer user : https://docs.rstudio.com/shiny-server/#bookmark_state_dir forbookmark storage configuration. local approaches: https://community.rstudio.com/t/changing-bookmark-state-directory--saving--disk/37877 (Undocumented) now includes simple logging system described : dataset_name entry deprecated following versions. Allows periodical reloading datasets via reload_period parameter.","code":""},{"path":[]},{"path":"/news/index.html","id":"major-changes-2-0-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"dv.manager 2.0.0","text":"Instantiating modules longer done means rlang expression function single argument. Documentation can found argument contains list : unfiltered_dataset: metaReactive list containing tables inside selected dataset filtering . filtered_dataset: metaReactive list containing tables inside selected dataset filtering . url_parameters: reactive list parameters passed url. dataset_name: reactive string containing name selected dataset. module_output: function called returns list values returned different modules indexed module_id. module_names: non-reactive named list containing values names module entries displayed tab names ids module entries used Shiny. utils: list convenience functions: switch2: function allows switching tabs programatically set dispatcher functions facilitate access included. Documentation can found . dv.manager isolates custom CSS styling loaded modules. ensures CSS styles applied intended. dv.manager allows including startup message dv.manager now includes possibility SSO using Azure Active Directory","code":""},{"path":"/news/index.html","id":"minor-changes-2-0-0","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"dv.manager 2.0.0","text":"Data selector disappears , one, dataset passed app. format date presented application now “2021-Jan-01 (UTC)”. size package reduced avoid check notes.","code":""},{"path":"/news/index.html","id":"dvmanager-100","dir":"Changelog","previous_headings":"","what":"dv.manager 1.0.0","title":"dv.manager 1.0.0","text":"modulemanager packages now dv.manager first productive release module manager Easily generates Shiny app simple code Offers UI container Shiny modules developed compatible Acts data dispatcher transparently allows dataset switching filtering Allows bookmarking state generated Shiny app (included modules must compatible feature)","code":""}]