Description Usage Arguments Details Value Functions See Also Examples
This function is a wrapper of add_shiny_module()
to add skeleton for a
analysis module.
1 2 3 4 5 6 7 8 9 10 11 | add_analysis_module(
name,
ignore = FALSE,
open = TRUE,
source_template = "mod_template.R",
test_template = "test-mod_template.R"
)
add_cs_module(name, ignore = FALSE, open = TRUE)
add_ts_module(name, ignore = FALSE, open = TRUE)
|
name |
A character of module name, i.g. "abc". |
ignore |
A logical to indicate whether the produced file to be ignored by git. |
open |
A logical to indicate whether open the produced file. |
source_template |
A character of R source template, default is "mod_template.R". |
test_template |
A character of R source template, default is "test-mod_template.R". |
add_cs_module()
is a wrapper of this function for cross-sectional
analysis modules.
add_ts_module()
is a wrapper of this function for time series
analysis modules.
A logical vector indicating if target files created successfully.
add_cs_module
: Add skeleton of module for
cross-sectional analysis.
add_ts_module
: Add skeleton of module for
time series analysis.
Other utils_dev:
add_shiny_module()
,
debug_mode
,
save_debug_data()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ## Not run:
## Create skeleton of general analysis module
# Create source/test file for module of "abc"
# ("mod_abc.R" and "test-mod_abc.R")
add_analysis_module("abc")
# Try integration test of module
abc_app()
# Make sure tests of module is OK
testthat::test_file("tests/testthat/test-mod_abc.R")
## Create skeleton of cross-section analysis module
# Create source/test file for module of "abc"
# ("mod_cs_abc.R" and "test-mod_cs_abc.R")
add_analysis_module("abc")
# Try integration test of module
cs_abc_app()
# Make sure tests of module is OK
testthat::test_file("tests/testthat/test-mod_cs_abc.R")
## Create skeleton of time series analysis module
# Create source/test file for module of "abc"
# ("mod_ts_abc.R" and "test-mod_ts_abc.R")
add_analysis_module("abc")
# Try integration test of module
ts_abc_app()
# Make sure tests of module is OK
testthat::test_file("tests/testthat/test-mod_ts_abc.R")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.