Description Usage Arguments Value Preloading data Examples
View source: R/app_build_me_w_loader.R
Function to spawn a shiny app instance for Multimorbidity Explorer app with data loading screen. Optionally data can be preloaded.
1 2 3 4 5 | build_me_w_loader(
preloaded_path = NULL,
auto_run = FALSE,
snp_colors = c("#bdbdbd", "#fecc5c", "#a50f15")
)
|
preloaded_path |
File path relative to app that preloaded data is
stored. Defaults to |
auto_run |
Do you want the app to run immediately or do you want the ui
and server components of the app to run later? Defaults to |
snp_colors |
Array of valid css color codes for 0, 1, and 2 copies of the minor allele in network plot. |
Shiny app process
If a set of results are going to be repeatedly
visited in the app, the data for the results can be preloaded to save time.
Once data is preloaded it populates a dropdown menu on the data-loading
screen that can be used to select the desired dataset. To do this, the data
must be loaded into a path (relative to the main app working directory)
provided to run_data_loader()
in the preloaded_data_path
argument.
The neccesary files, relative to preloaded_data_loc/
are:
<SNP_ID>/id_to_code.csv
or id_to_code.csv
: Subject-level phenome file (if left in main preloaded directory is used as common phenome)
<SNP_ID>/id_to_snp.csv
: Subject-level genotype file
<SNP_ID>/phewas_results.csv
: PheWAS results
For further details on the format of these dataset see the getting started article on package website.
1 2 3 4 | ## Not run:
meToolkit::build_me_w_loader()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.