Skip to contents

Reads in the app state from yaml files.

Usage

MB_mk_preload(state)

Arguments

state

MB state object

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

sess_res = MB_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: 1e924d8c354e5881cf2db63a1c57051d
#> → MB: module checksum updated:f6c1ff30af12212efb50175ba6cdcc2c
#>  
#>  
#>  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: c4f4c0e5f965b6780527ecaf0bdc6a7b
#> → MB: module checksum updated:bb6c5bd94ce46aaa92a8f7c7d73115c4
#> → 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: 143e2f39cdb719b827868e2073738ed9
#> → MB: module checksum updated:5ce8afe00778e3abb9a192e0bb1ba486
#> → 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: 242afba7ae59c34d2d94f5efe5d4a624
#> → MB: module checksum updated:5b4841c73ccec46970c5be49425d63c0
#> → 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: a26e2d7eb14693a61d0c258527111e32
#> → MB: module checksum updated:6acb2ac77bb1f60a7852deeac479aa86
#> → MB: added element idx: 2
#> → MB: module isgood: TRUE
state = sess_res$state
res = MB_mk_preload(state)
#> → MB: saving element (1) One compartment model
#> → MB: saving element (2) PK Biomarker
#> → MB: mk_preload isgood: TRUE