Skip to contents

Populates the supplied session variable for testing.

Usage

CTS_test_mksession(session = list())

Arguments

session

Shiny session variable (in app) or a list (outside of app)

Value

The CTS portion of the all_sess_res returned from ASM_set_app_state

Examples

# \donttest{
sess_res = CTS_test_mksession()
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → ASM:   dest:   file.path("config","report.docx")
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → ASM:   dest:   file.path("config","report.pptx")
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → ASM:   dest:   file.path("config","report.yaml")
#> → ASM: State initialized
#> → ASM: module isgood: TRUE
#> → MB: including file
#> → MB:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → MB:   dest:   file.path("config","report.docx")
#> → MB: including file
#> → MB:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → MB:   dest:   file.path("config","report.pptx")
#> → MB: including file
#> → MB:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → MB:   dest:   file.path("config","report.yaml")
#> ! MB: User-defined model: /Users/jmh/projects/ruminate/github/ruminate/docs/reference/user_model.R not found (skipping)
#> ! MB: User-defined model: /Users/jmh/projects/ruminate/github/ruminate/docs/reference/user_model.ctl not found (skipping)
#> → MB: module checksum updated:24933f86b657b9503f22440e8c4d3cac
#> → MB: State initialized
#> → MB: loading model idx: 1
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> → MB: model checksum updated: 8911fc506ba3bf2824e9ff1da1379aac
#> → MB: module checksum updated:5095d65c2f257d705855a6ddbc6dc7a7
#> → MB: setting name: One compartment model
#> → MB: setting time scale: hours
#> → MB: setting base from: user
#> → MB: setting catalog selection: 
#> → MB: setting base model id: manual
#> → MB: setting base model name: manual
#> → MB: model checksum updated: a9377216084868217a1496c27e249347
#> → MB: module checksum updated:d81158159bd5323e1e73f01f41e5cdd7
#> → MB: added element idx: 1
#> → MB: loading model idx: 2
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> → MB: model checksum updated: a2705583c39f533700b82e27229faaf5
#> → MB: module checksum updated:ad958a4d17feaeeba51248cd2625870d
#> → MB: setting name: PK Biomarker
#> → MB: setting time scale: days
#> → MB: setting base from: user
#> → MB: setting catalog selection: 
#> → MB: setting base model id: manual
#> → MB: setting base model name: manual
#> → MB: model checksum updated: 9e566c4f2ecefda905229bfcaa28cf71
#> → MB: module checksum updated:0a5d8f6a73a7b85b9e966de1594b3865
#> → MB: added element idx: 2
#> Called from: MB_preload(session = session, src_list = src_list, yaml_res = yaml_res, 
#>     mod_ID = mod_ID, react_state = react_state, quickload = quickload)
#> debug: formods::FM_le(state, paste0("module isgood: ", isgood))
#> → MB: module isgood: TRUE
#> debug: if (("ShinySession" %in% class(session))) {
#>     FM_set_mod_state(session, mod_ID, state)
#> } else {
#>     session = FM_set_mod_state(session, mod_ID, state)
#> }
#> debug: session = FM_set_mod_state(session, mod_ID, state)
#> debug: res = list(isgood = isgood, msgs = msgs, session = session, input = input, 
#>     react_state = react_state, state = state)
#> debug: res
#> → CTS: including file
#> → CTS:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → CTS:   dest:   file.path("config","report.docx")
#> → CTS: including file
#> → CTS:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → CTS:   dest:   file.path("config","report.pptx")
#> → CTS: including file
#> → CTS:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → CTS:   dest:   file.path("config","report.yaml")
#> → CTS: source model change detected
#> → CTS:  > covariates reset
#> → CTS: cohort checksum updated: bc1de16244650329a4c97a63637aa965
#> → CTS: module checksum updated: 170f83727acd417f0374620f03dc4316
#> → CTS: State initialized
#> → CTS: source model change detected
#> → CTS:  > covariates reset
#> → CTS: cohort checksum updated: 8468c4a061cb1df849ddd449fdad0ec7
#> → CTS: module checksum updated: e4d88a11fcde148c754a69871ae2f310
#> → CTS: loading element idx: 1
#> → CTS: setting cohort name: Single dose
#> → CTS: setting model source: MB_obj_1_rx
#> → CTS: setting trial options:
#> → CTS:   - nsub: 3
#> → CTS:   - visit_times: 0
#> → CTS:   - trial_end: 100
#> → CTS:   - fpage: 1
#> → CTS:   - dvcols: Cc
#> → CTS:   - time_scale: 
#> → CTS:   - tc_dim: d2x4
#> → CTS:   - evplot: 1
#> → CTS:   - cts_config_atol: 1e-8
#> → CTS:   - cts_config_rtol: 1e-6
#> → CTS:   - cts_config_sigdig: NULL
#> → CTS:   - cts_config_seed: 5446
#> → CTS:   - cts_config_nsteps: 5
#> → CTS: cohort checksum updated: 4e59d508617c4e8f49df8b2311935e00
#> → CTS: module checksum updated: 76e8ba57e1b2a3e9ef382580fd62479a
#> → CTS: adding rule: first_dose
#> → CTS: add rule success
#> → CTS: rule added
#> → CTS: cohort checksum updated: 9d4a253fd7bd6835a94db3bc04180e89
#> → CTS: module checksum updated: 771581d9a7008317946a834323b7aecc
#>  
#>  
#> using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
#> using SDK: ‘’
#>  
#>  
#> using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
#> using SDK: ‘’
#> Warning: multi-subject simulation without without 'omega'
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> → CTS: simulation complete
#> → CTS: plot complete
#> → CTS: cohort checksum updated: c9bc628332c19ebbd4fc7716cb3b8c7d
#> → CTS: module checksum updated: 2492cb0c548e22bff8ac0051788d8b0c
#> → CTS: added element idx: 1
#> → CTS: loading element idx: 2
#> → CTS: setting cohort name: Biomarker Titration
#> → CTS: setting model source: MB_obj_2_rx
#> → CTS: source model change detected
#> → CTS:  > covariates reset
#> → CTS: setting trial options:
#> → CTS:   - nsub: 12
#> → CTS:   - visit_times: (0:6)*28*2
#> → CTS:   - trial_end: 400
#> → CTS:   - fpage: 1
#> → CTS:   - dvcols: C_ng_ml
#> → CTS:   - dvcols: BM
#> → CTS:   - time_scale: weeks
#> → CTS:   - tc_dim: d2x4
#> → CTS:   - evplot: 1
#> → CTS:   - cts_config_atol: 1e-8
#> → CTS:   - cts_config_rtol: 1e-6
#> → CTS:   - cts_config_sigdig: NULL
#> → CTS:   - cts_config_seed: 5446
#> → CTS:   - cts_config_nsteps: 50
#> → CTS: adding covariates:
#> → CTS:   - WT: cont_lognormal (70, .1)
#> → CTS:   - SEX_ID: discrete (0, 1)
#> → CTS:   - SUBTYPE_ID: fixed (1)
#> → CTS: cohort checksum updated: 4e9b45f89dc5a346b632548eb96c8ee8
#> → CTS: module checksum updated: 28f872ae5afe5c5c004b30276370765f
#> → CTS: adding rule: first_dose
#> → CTS: add rule success
#> → CTS: rule added
#> → CTS: cohort checksum updated: f55ec4159d0d6afa04a775d0129571bd
#> → CTS: module checksum updated: 397290d2eefaef12ca763308d98f449f
#> → CTS: adding rule: keep_dose
#> → CTS: add rule success
#> → CTS: rule added
#> → CTS: cohort checksum updated: 427ffe2d137851da82bf2b595603bc17
#> → CTS: module checksum updated: cc5dcf130ebdb88385c66e6a1fc2bb50
#> → CTS: adding rule: decrease_dose
#> → CTS: add rule success
#> → CTS: rule added
#> → CTS: cohort checksum updated: 4d212892986b4b42ab535415acda5ce7
#> → CTS: module checksum updated: d9504b8faf3ad95971c8105a3e06c1f4
#> → CTS: adding rule: increase_dose
#> → CTS: add rule success
#> → CTS: rule added
#> → CTS: cohort checksum updated: 1e8bdb4b44557820593bd32960322810
#> → CTS: module checksum updated: 9f16c284aa48502eaf92a3546ed350d8
#>  
#>  
#> using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
#> using SDK: ‘’
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> Evaluation times ■■■■■■■■■                         25% | ETA:  4s
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> Warning: IDs without zero-time start at the first observed time: 12 11 10 9 8 7 6 5 4 3 2 1
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> Warning: IDs without zero-time start at the first observed time: 12 11 10 9 8 7 6 5 4 3 2 1
#> Evaluation times ■■■■■■■■■■■■■■■■                  50% | ETA:  3s
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> Warning: IDs without zero-time start at the first observed time: 12 11 10 9 8 7 6 5 4 3 2 1
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> Warning: IDs without zero-time start at the first observed time: 12 11 10 9 8 7 6 5 4 3 2 1
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> Warning: IDs without zero-time start at the first observed time: 12 11 10 9 8 7 6 5 4 3 2 1
#> Evaluation times ■■■■■■■■■■■■■■■■■■■■■■■■■■■       88% | ETA:  1s
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> Warning: IDs without zero-time start at the first observed time: 12 11 10 9 8 7 6 5 4 3 2 1
#> Evaluation times ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■  100% | ETA:  0s
#> → CTS: simulation complete
#> → CTS: plot complete
#> → CTS: cohort checksum updated: da252163b020fee9754a16958247a888
#> → CTS: module checksum updated: 83b43c58075c2480a55dc4fd562a9743
#> → CTS: added element idx: 2
#> → CTS: module isgood: TRUE
# }