| ie_run_app | R Documentation |
Wraps your own module composition in the isoexplorer navbar shell (theme
picker, dark-mode toggle, about popup) and, by default, runs it. Build your
layout from the package's modules, instantiate the ie_file_server() and wire
the modules in setup_modules. Supply EITHER main (a single content area) OR
nav_panels (a centered navbar tabset).
ie_run_app(
isofiles,
main = NULL,
setup_modules,
timezone = Sys.timezone(),
default_theme = app_themes(),
nav_panels = NULL,
selected = NULL,
initial_selection = TRUE,
upload_folder = NULL,
monitoring_folders = NULL,
examples_folder = NULL,
temporary_storage = FALSE,
max_upload_size = NULL,
options = list(),
uiPattern = "/",
enableBookmarking = "url",
detached = FALSE,
launch = TRUE,
stop_on_close = detached,
log_level = c("WARN", "INFO", "DEBUG", "TRACE", "ERROR", "FATAL")
)
isofiles |
the |
main |
a single UI content area (use this OR |
setup_modules |
|
timezone |
timezone for datetime display |
default_theme |
default bslib Bootstrap 5 theme preset |
nav_panels |
a list of |
selected |
the value/title of the |
initial_selection |
initial file selection, see |
upload_folder |
upload directory for the navbar upload button; |
monitoring_folders |
folders to watch for new isofiles ( |
examples_folder |
directory for the "Load examples" navbar button
( |
temporary_storage |
note in the upload dialog that uploads are
session-only (informational; default |
max_upload_size |
maximum per-file upload size in MB; sets the
|
options |
Named options that should be passed to the |
uiPattern |
A regular expression that will be applied to each |
enableBookmarking |
Can be one of |
detached |
if |
launch |
only relevant when |
stop_on_close |
if |
log_level |
how verbosely the app logs, one of |
The detached / launch arguments control how it runs: detached = TRUE
launches it in a separate R process (leaving this session free);
detached = FALSE, launch = TRUE (the default) runs it in the current session
(blocking) with shiny::runApp(); detached = FALSE, launch = FALSE returns
the shiny::shinyApp() object unrun (for deployment or manual launching). The
focused explorers (ie_explore_continuous_flow() etc.) and
ie_create_isofiles_server() are wrappers that call this with the appropriate
detached / launch.
When detached = TRUE, the callr::r_bg() process (invisibly, with the
app URL attached as an attribute); when detached = FALSE and launch = TRUE,
the result of shiny::runApp() (after the app stops); when detached = FALSE
and launch = FALSE, the shiny::shinyApp() object.
if (interactive()) {
# read the bundled isoreader2 examples (a mixed set of all types)
iso <-
isoreader2::ir_examples_folder() |>
isoreader2::ir_find_isofiles() |>
isoreader2::ir_read_isofiles()
# a minimal custom app: a scans selector next to a scans plot
ie_run_app(
isofiles = iso,
main = ie_type_explorer_ui("meta", ie_scans_plot_ui("scan")),
setup_modules = function(file, code) {
ie_scans_metadata_server("meta", file)
ie_scans_plot_server("scan", file)
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.