Reads in the app state from yaml files.
Value
list with the following elements
isgood: Boolean indicating the exit status of the function.
msgs: Messages to be passed back to the user.
yaml_list: Lists with preload components.
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: setting word placeholders:
#> → ASM: -> setting docx ph: HEADERLEFT = left header
#> → ASM: -> setting docx ph: HEADERRIGHT = right header
#> → ASM: -> setting docx ph: FOOTERLEFT = left footer
#> → 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:f7de2055542d3ff1b085fafc2d30a1f8
#> → 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: 69c6cbc7d0be1ac864857eeadfcfeff7
#> → MB: module checksum updated:b4166ff7f72bc1d1710ddd07c69fc7f7
#>
#>
#> ℹ 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: ac0116dd3d06605f944479f2730f264f
#> → MB: module checksum updated:068b8b00499c03c00a4c12ed916490c9
#> → 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: 34b83789ef2317bcc45f9d351adc6d46
#> → MB: module checksum updated:e38a8276d94effc15f05cc9778960297
#> → 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: 54fd6e521023185ca582ed390f8d2e69
#> → MB: module checksum updated:482956b9790b9f57dc8f81479cbc5310
#> → 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: 684b6eba103c8da4459db8473bb5a375
#> → MB: module checksum updated:9aaabda904da770dd7b716e8b2e53739
#> → MB: added element idx: 2
#> → MB: module isgood: TRUE
#> → 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: ac752ff647057c7859bcf788db4eb1eb
#> → CTS: module checksum updated: cbd809d449db5735562aefb0f097f650
#> → CTS: State initialized
#> → 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: - cts_config_preamble:
#> → CTS: cohort checksum updated: 764e778c8d6ae03e630e21bf990f69a4
#> → CTS: module checksum updated: 4ac369731677ba322641eefa8dbff3e1
#> → CTS: adding rule: first_dose
#> → CTS: add rule success
#> → CTS: rule added
#> → CTS: cohort checksum updated: 87391b585154abeac55a4a9fda7b4e8f
#> → CTS: module checksum updated: cf19c5e3b08e0d4d6420f68082a69541
#>
#>
#>
#>
#> Warning: multi-subject simulation without without 'omega'
#>
#>
#> Warning: multi-subject simulation without without 'omega'
#> → CTS: simulation complete
#> → CTS: plot complete
#> → CTS: cohort checksum updated: 69177f9eaa6a308a520bb0c35f129814
#> → CTS: module checksum updated: 90ab1469418b15cbecfec842a66c0be4
#> → CTS: added element idx: 1
#> → CTS: module isgood: TRUE
state = sess_res$state
res = CTS_mk_preload(state)
#> → CTS: saving element (1) Single dose
#> → CTS: -> rule dose
#> → CTS: mk_preload isgood: TRUE
# }