Skip to contents

Creates a list of the initialized module state

Usage

CTS_init_state(FM_yaml_file, MOD_yaml_file, id, id_MB, session)

Arguments

FM_yaml_file

App configuration file with FM as main section

MOD_yaml_file

Module configuration file with MC as main section

id

ID string for the module

id_MB

An ID string that corresponds with the ID used to call the MB modules

session

Shiny session variable

Value

list containing an empty CTS state

Examples

# Within shiny both session and input variables will exist,
# this creates examples here for testing purposes:
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: 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: 8b3f3b8af91627c0483413c0e0442669
#> → MB: module checksum updated:286a139c83f58035b4e9dc5acf49d038
#>  
#>  
#>  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: 5f1b23b2d9a79cf5846ff0d31aa546e5
#> → MB: module checksum updated:0bdd4b6718625094549797c04d55d98e
#> → 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: dabcf0060488da635fd86bd7199eeaac
#> → MB: module checksum updated:d92ba98b47330355c06634c9d161c53e
#> → 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: 581647073aa247db2cfb62a7f8824341
#> → MB: module checksum updated:76bf26c1c68ea7d0ba734efe07932ca9
#> → 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: 285c2f14ea0a75939504345a76fa647f
#> → MB: module checksum updated:defa767de59af224ca683c7c6cf2983a
#> → MB: added element idx: 2
#> → MB: module isgood: TRUE
session = sess_res$session
input   = sess_res$input

state = CTS_init_state(
   FM_yaml_file  = system.file(package = "formods",
                               "templates",
                               "formods.yaml"),
   MOD_yaml_file = system.file(package = "ruminate",
                               "templates",
                               "CTS.yaml"),
   id              = "CTS",
   id_MB           = "MB",
   session         = session)
#> → 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: 7662291cfda678368edef72abe61a255
#> → CTS: module checksum updated: 351269c95d7155b66deffb91bd3f52fc
#> → CTS: State initialized

state
#> $yaml
#> $yaml$FM
#> $yaml$FM$include
#> $yaml$FM$include$files
#> $yaml$FM$include$files[[1]]
#> $yaml$FM$include$files[[1]]$file
#> $yaml$FM$include$files[[1]]$file$source
#> [1] "file.path(system.file(package=\"onbrand\"), \"templates\", \"report.docx\")"
#> 
#> $yaml$FM$include$files[[1]]$file$dest
#> [1] "file.path(\"config\",\"report.docx\")"
#> 
#> 
#> 
#> $yaml$FM$include$files[[2]]
#> $yaml$FM$include$files[[2]]$file
#> $yaml$FM$include$files[[2]]$file$source
#> [1] "file.path(system.file(package=\"onbrand\"), \"templates\", \"report.pptx\")"
#> 
#> $yaml$FM$include$files[[2]]$file$dest
#> [1] "file.path(\"config\",\"report.pptx\")"
#> 
#> 
#> 
#> $yaml$FM$include$files[[3]]
#> $yaml$FM$include$files[[3]]$file
#> $yaml$FM$include$files[[3]]$file$source
#> [1] "file.path(system.file(package=\"onbrand\"), \"templates\", \"report.yaml\")"
#> 
#> $yaml$FM$include$files[[3]]$file$dest
#> [1] "file.path(\"config\",\"report.yaml\")"
#> 
#> 
#> 
#> 
#> 
#> $yaml$FM$deployed
#> [1] FALSE
#> 
#> $yaml$FM$code
#> $yaml$FM$code$theme
#> [1] "vibrant_ink"
#> 
#> $yaml$FM$code$showLineNumbers
#> [1] TRUE
#> 
#> $yaml$FM$code$gen_file
#> [1] "run_analysis.R"
#> 
#> $yaml$FM$code$gen_preamble
#> [1] "# formods automated output ------------------------------------------------\n# https://formods.ubiquity.tools/\nrm(list=ls())"
#> 
#> $yaml$FM$code$packages
#> [1] "onbrand" "writexl"
#> 
#> 
#> $yaml$FM$notifications
#> $yaml$FM$notifications$config
#> $yaml$FM$notifications$config$success
#> $yaml$FM$notifications$config$success$useFontAwesome
#> [1] FALSE
#> 
#> $yaml$FM$notifications$config$success$useIcon
#> [1] FALSE
#> 
#> $yaml$FM$notifications$config$success$background
#> [1] "#5bb85b"
#> 
#> 
#> $yaml$FM$notifications$config$failure
#> $yaml$FM$notifications$config$failure$useFontAwesome
#> [1] FALSE
#> 
#> $yaml$FM$notifications$config$failure$useIcon
#> [1] FALSE
#> 
#> $yaml$FM$notifications$config$failure$background
#> [1] "#d9534f"
#> 
#> 
#> $yaml$FM$notifications$config$info
#> $yaml$FM$notifications$config$info$useFontAwesome
#> [1] FALSE
#> 
#> $yaml$FM$notifications$config$info$useIcon
#> [1] FALSE
#> 
#> $yaml$FM$notifications$config$info$background
#> [1] "#5bc0de"
#> 
#> 
#> $yaml$FM$notifications$config$warning
#> $yaml$FM$notifications$config$warning$useFontAwesome
#> [1] FALSE
#> 
#> $yaml$FM$notifications$config$warning$useIcon
#> [1] FALSE
#> 
#> $yaml$FM$notifications$config$warning$background
#> [1] "#f0ac4d"
#> 
#> 
#> 
#> 
#> $yaml$FM$reporting
#> $yaml$FM$reporting$enabled
#> [1] TRUE
#> 
#> $yaml$FM$reporting$content_init
#> $yaml$FM$reporting$content_init$xlsx
#> [1] "rpt = list(summary = NULL,\n           sheets  = list())"
#> 
#> $yaml$FM$reporting$content_init$docx
#> [1] "rpt  = onbrand::read_template(\n  template = file.path(\"config\", \"report.docx\"),\n  mapping  = file.path(\"config\", \"report.yaml\"))"
#> 
#> $yaml$FM$reporting$content_init$pptx
#> [1] "rpt  = onbrand::read_template(\n  template = file.path(\"config\", \"report.pptx\"),\n  mapping  = file.path(\"config\", \"report.yaml\"))"
#> 
#> 
#> $yaml$FM$reporting$phs
#> $yaml$FM$reporting$phs[[1]]
#> $yaml$FM$reporting$phs[[1]]$name
#> [1] "HEADERLEFT"
#> 
#> $yaml$FM$reporting$phs[[1]]$location
#> [1] "header"
#> 
#> $yaml$FM$reporting$phs[[1]]$value
#> [1] ""
#> 
#> $yaml$FM$reporting$phs[[1]]$tooltip
#> [1] "left header text"
#> 
#> 
#> $yaml$FM$reporting$phs[[2]]
#> $yaml$FM$reporting$phs[[2]]$name
#> [1] "HEADERRIGHT"
#> 
#> $yaml$FM$reporting$phs[[2]]$location
#> [1] "header"
#> 
#> $yaml$FM$reporting$phs[[2]]$value
#> [1] ""
#> 
#> $yaml$FM$reporting$phs[[2]]$tooltip
#> [1] "right header text"
#> 
#> 
#> $yaml$FM$reporting$phs[[3]]
#> $yaml$FM$reporting$phs[[3]]$name
#> [1] "FOOTERLEFT"
#> 
#> $yaml$FM$reporting$phs[[3]]$location
#> [1] "footer"
#> 
#> $yaml$FM$reporting$phs[[3]]$value
#> [1] ""
#> 
#> $yaml$FM$reporting$phs[[3]]$tooltip
#> [1] "left footer text"
#> 
#> 
#> 
#> $yaml$FM$reporting$phs_formatting
#> $yaml$FM$reporting$phs_formatting$width
#> [1] "100%"
#> 
#> $yaml$FM$reporting$phs_formatting$tt_position
#> [1] "left"
#> 
#> $yaml$FM$reporting$phs_formatting$tt_size
#> [1] "medium"
#> 
#> 
#> 
#> $yaml$FM$ui
#> $yaml$FM$ui$button_style
#> [1] "fill"
#> 
#> $yaml$FM$ui$select_size
#> [1] 10
#> 
#> $yaml$FM$ui$color_green
#> [1] "#00BB8A"
#> 
#> $yaml$FM$ui$color_red
#> [1] "#FF475E"
#> 
#> $yaml$FM$ui$color_blue
#> [1] "#0088FF"
#> 
#> $yaml$FM$ui$color_purple
#> [1] "#bd2cf4"
#> 
#> 
#> $yaml$FM$data_meta
#> $yaml$FM$data_meta$data_header
#> [1] "<span style='color:===COLOR==='><b>===NAME===</b><br/><font size='-3'>===LABEL===</font></span>"
#> 
#> $yaml$FM$data_meta$subtext
#> [1] "===LABEL===: ===RANGE==="
#> 
#> $yaml$FM$data_meta$many_sep
#> [1] ",...,"
#> 
#> $yaml$FM$data_meta$data_types
#> $yaml$FM$data_meta$data_types$character
#> $yaml$FM$data_meta$data_types$character$color
#> [1] "#DD4B39"
#> 
#> $yaml$FM$data_meta$data_types$character$label
#> [1] "text"
#> 
#> 
#> $yaml$FM$data_meta$data_types$double
#> $yaml$FM$data_meta$data_types$double$color
#> [1] "#3C8DBC"
#> 
#> $yaml$FM$data_meta$data_types$double$label
#> [1] "num"
#> 
#> 
#> $yaml$FM$data_meta$data_types$integer
#> $yaml$FM$data_meta$data_types$integer$color
#> [1] "#3C8DBC"
#> 
#> $yaml$FM$data_meta$data_types$integer$label
#> [1] "num"
#> 
#> 
#> $yaml$FM$data_meta$data_types$other
#> $yaml$FM$data_meta$data_types$other$color
#> [1] "black"
#> 
#> $yaml$FM$data_meta$data_types$other$label
#> [1] "other"
#> 
#> 
#> 
#> 
#> $yaml$FM$labels
#> $yaml$FM$labels$default_ds
#> [1] "Original data set"
#> 
#> 
#> $yaml$FM$user_files
#> $yaml$FM$user_files$use_tmpdir
#> [1] TRUE
#> 
#> 
#> $yaml$FM$logging
#> $yaml$FM$logging$enabled
#> [1] TRUE
#> 
#> $yaml$FM$logging$timestamp
#> [1] TRUE
#> 
#> $yaml$FM$logging$timestamp_fmt
#> [1] "%Y-%m-%d %H:%M:%S"
#> 
#> $yaml$FM$logging$log_file
#> [1] "formods_log.txt"
#> 
#> $yaml$FM$logging$console
#> [1] TRUE
#> 
#> 
#> 
#> 
#> $MC
#> $MC$module
#> $MC$module$type
#> [1] "CTS"
#> 
#> $MC$module$depends
#> $MC$module$depends$id_ASM
#> [1] "ASM"
#> 
#> $MC$module$depends$id_MB
#> [1] "MB"
#> 
#> 
#> 
#> $MC$element_object_name
#> [1] "CTS_obj"
#> 
#> $MC$code
#> $MC$code$packages
#> [1] "rxode2"     "nonmem2rx"  "nlmixr2lib"
#> 
#> $MC$code$readOnly
#> [1] TRUE
#> 
#> $MC$code$mode
#> [1] "r"
#> 
#> 
#> $MC$compact
#> $MC$compact$code
#> [1] TRUE
#> 
#> $MC$compact$clip
#> [1] TRUE
#> 
#> 
#> $MC$reporting
#> $MC$reporting$enabled
#> [1] TRUE
#> 
#> $MC$reporting$priority
#> [1] 2
#> 
#> $MC$reporting$figures
#> $MC$reporting$figures$tc
#> $MC$reporting$figures$tc$caption_single
#> [1] "===CHTDESC=== (Time-course)"
#> 
#> $MC$reporting$figures$tc$caption_multiple
#> [1] "===CHTDESC=== (Time-course, panel ===FIGNUM=== of ===FIGTOT===)"
#> 
#> $MC$reporting$figures$tc$title_single
#> [1] "===CHTDESC=== (Time-course)"
#> 
#> $MC$reporting$figures$tc$title_multiple
#> [1] "===CHTDESC=== (Time-course)"
#> 
#> $MC$reporting$figures$tc$sub_title_single
#> [1] ""
#> 
#> $MC$reporting$figures$tc$sub_title_multiple
#> [1] "===FIGNUM=== of ===FIGTOT==="
#> 
#> 
#> $MC$reporting$figures$ev
#> $MC$reporting$figures$ev$caption_single
#> [1] "===CHTDESC=== (Event Table)"
#> 
#> $MC$reporting$figures$ev$caption_multiple
#> [1] "===CHTDESC=== (Event Table, ===FIGNUM=== of ===FIGTOT===)"
#> 
#> $MC$reporting$figures$ev$title_single
#> [1] "===CHTDESC=== (Event Table)"
#> 
#> $MC$reporting$figures$ev$title_multiple
#> [1] "===CHTDESC=== (Event Table)"
#> 
#> $MC$reporting$figures$ev$sub_title_single
#> [1] ""
#> 
#> $MC$reporting$figures$ev$sub_title_multiple
#> [1] "===FIGNUM=== of ===FIGTOT==="
#> 
#> 
#> 
#> 
#> $MC$formatting
#> $MC$formatting$code
#> $MC$formatting$code$width
#> [1] 800
#> 
#> $MC$formatting$code$height
#> [1] 300
#> 
#> 
#> $MC$formatting$current_element
#> $MC$formatting$current_element$width
#> [1] "200px"
#> 
#> 
#> $MC$formatting$source_model
#> $MC$formatting$source_model$width
#> [1] "200px"
#> 
#> 
#> $MC$formatting$element_name
#> $MC$formatting$element_name$width
#> [1] "200px"
#> 
#> 
#> $MC$formatting$preview
#> $MC$formatting$preview$width
#> [1] "800px"
#> 
#> $MC$formatting$preview$height
#> [1] "500px"
#> 
#> 
#> $MC$formatting$input
#> NULL
#> 
#> $MC$formatting$button_clk_run
#> $MC$formatting$button_clk_run$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_run$block
#> [1] TRUE
#> 
#> 
#> $MC$formatting$button_clk_del
#> $MC$formatting$button_clk_del$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_del$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_del$tooltip
#> [1] "Delete the current cohort."
#> 
#> $MC$formatting$button_clk_del$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$button_clk_save
#> $MC$formatting$button_clk_save$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_save$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_save$tooltip
#> [1] "Save the name for the current cohort."
#> 
#> $MC$formatting$button_clk_save$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$button_clk_runsim
#> $MC$formatting$button_clk_runsim$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_runsim$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_runsim$tooltip
#> [1] "Simulate or resimulate the cohort with the current rules applied."
#> 
#> $MC$formatting$button_clk_runsim$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$button_clk_update_plot
#> $MC$formatting$button_clk_update_plot$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_update_plot$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_update_plot$tooltip
#> [1] "Update timecourse figures."
#> 
#> $MC$formatting$button_clk_update_plot$tooltip_position
#> [1] "top"
#> 
#> 
#> $MC$formatting$button_clk_clip
#> $MC$formatting$button_clk_clip$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_clip$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_clip$tooltip
#> [1] "Copy the code to generate the current cohort to the clipboard."
#> 
#> $MC$formatting$button_clk_clip$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$button_clk_copy
#> $MC$formatting$button_clk_copy$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_copy$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_copy$tooltip
#> [1] "Make a copy of the current cohort."
#> 
#> $MC$formatting$button_clk_copy$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$button_clk_new
#> $MC$formatting$button_clk_new$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_new$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_new$tooltip
#> [1] "Create a new cohort."
#> 
#> $MC$formatting$button_clk_new$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$button_clk_add_rule
#> $MC$formatting$button_clk_add_rule$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_add_rule$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_add_rule$tooltip
#> [1] "Add a new rule."
#> 
#> $MC$formatting$button_clk_add_rule$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$button_clk_add_cov
#> $MC$formatting$button_clk_add_cov$width
#> [1] "456px"
#> 
#> $MC$formatting$button_clk_add_cov$size
#> [1] "sm"
#> 
#> $MC$formatting$button_clk_add_cov$block
#> [1] TRUE
#> 
#> $MC$formatting$button_clk_add_cov$tooltip
#> [1] "Define covariate."
#> 
#> $MC$formatting$button_clk_add_cov$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$rule_condition
#> $MC$formatting$rule_condition$width
#> [1] 300
#> 
#> $MC$formatting$rule_condition$height
#> [1] 100
#> 
#> $MC$formatting$rule_condition$tooltip
#> [1] "This is a condition that should evaluate to either TRUE (if the action should be taken) or FALSE (if it should be skipped)."
#> 
#> $MC$formatting$rule_condition$tooltip_position
#> [1] "bottom"
#> 
#> $MC$formatting$rule_condition$placeholder
#> [1] "examples: TRUE will run the action at at every visit or (time > 0) & (Ac < 10) will be more selective."
#> 
#> 
#> $MC$formatting$action_dosing_state
#> $MC$formatting$action_dosing_state$width
#> [1] 400
#> 
#> $MC$formatting$action_dosing_state$choices
#> $MC$formatting$action_dosing_state$choices$dosing
#> [1] "Dosing Compartments"
#> 
#> $MC$formatting$action_dosing_state$choices$other
#> [1] "Other Compartments"
#> 
#> 
#> 
#> $MC$formatting$action_dosing_values
#> $MC$formatting$action_dosing_values$width
#> [1] 400
#> 
#> $MC$formatting$action_dosing_values$placeholder
#> [1] "c(1, 1, 1)"
#> 
#> $MC$formatting$action_dosing_values$tooltip
#> [1] "Expression defining dosing amounts that will evaluate as a numeric vector of numbers."
#> 
#> 
#> $MC$formatting$action_dosing_times
#> $MC$formatting$action_dosing_times$width
#> [1] 400
#> 
#> $MC$formatting$action_dosing_times$placeholder
#> [1] "c(0, 7, 14)"
#> 
#> $MC$formatting$action_dosing_times$tooltip
#> [1] "Expression defining dosing times that will evaluate as a numeric vector of numbers."
#> 
#> $MC$formatting$action_dosing_times$tooltip_position
#> [1] "bottom"
#> 
#> 
#> $MC$formatting$action_dosing_durations
#> $MC$formatting$action_dosing_durations$width
#> [1] 400
#> 
#> $MC$formatting$action_dosing_durations$placeholder
#> [1] "c(0, 0, 0)"
#> 
#> $MC$formatting$action_dosing_durations$tooltip
#> [1] "Expression containing dosing duration that will evaluate as a numeric vector of numbers (zeros for bolus dosing)."
#> 
#> $MC$formatting$action_dosing_durations$tooltip_position
#> [1] "bottom"
#> 
#> 
#> $MC$formatting$action_set_state_state
#> $MC$formatting$action_set_state_state$width
#> [1] 400
#> 
#> 
#> $MC$formatting$action_set_state_value
#> $MC$formatting$action_set_state_value$width
#> [1] 400
#> 
#> $MC$formatting$action_set_state_value$placeholder
#> [1] "A value like 20 or an expression in terms of a system element such as Ac/2"
#> 
#> $MC$formatting$action_set_state_value$tooltip
#> [1] "An expression that evaluates to a new number."
#> 
#> 
#> $MC$formatting$action_manual_code
#> $MC$formatting$action_manual_code$width
#> [1] 400
#> 
#> $MC$formatting$action_manual_code$height
#> [1] 200
#> 
#> $MC$formatting$action_manual_code$placeholder
#> [1] "SI_interval_ev = etRbind(SI_interval_ev,\n  et(cmt  = 'Ac',\n     id   = id,\n     amt  = 10,\n     evid = 4,\n     time = time))"
#> 
#> $MC$formatting$action_manual_code$tooltip
#> [1] "Expression with code to manually update the event table."
#> 
#> 
#> $MC$formatting$rule_type
#> $MC$formatting$rule_type$width
#> [1] 300
#> 
#> $MC$formatting$rule_type$options
#> $MC$formatting$rule_type$options$dose
#> $MC$formatting$rule_type$options$dose$choice
#> [1] "Dosing"
#> 
#> $MC$formatting$rule_type$options$dose$subtext
#> [1] "Add bolus or infusion dosing"
#> 
#> $MC$formatting$rule_type$options$dose$value
#> [1] "dose"
#> 
#> 
#> $MC$formatting$rule_type$options$state_reset
#> $MC$formatting$rule_type$options$state_reset$choice
#> [1] "Set State"
#> 
#> $MC$formatting$rule_type$options$state_reset$subtext
#> [1] "Reset the named state or compartment to a specified value"
#> 
#> $MC$formatting$rule_type$options$state_reset$value
#> [1] "set state"
#> 
#> 
#> $MC$formatting$rule_type$options$manual
#> $MC$formatting$rule_type$options$manual$choice
#> [1] "Manual"
#> 
#> $MC$formatting$rule_type$options$manual$subtext
#> [1] "Alter the event table directly."
#> 
#> $MC$formatting$rule_type$options$manual$value
#> [1] "manual"
#> 
#> 
#> 
#> 
#> $MC$formatting$config_text
#> $MC$formatting$config_text$width
#> [1] 150
#> 
#> 
#> $MC$formatting$config_select
#> $MC$formatting$config_select$width
#> [1] 150
#> 
#> 
#> $MC$formatting$config_textarea
#> $MC$formatting$config_textarea$width
#> [1] 456
#> 
#> $MC$formatting$config_textarea$height
#> [1] 150
#> 
#> 
#> $MC$formatting$hot_current_rules
#> $MC$formatting$hot_current_rules$width
#> [1] 800
#> 
#> $MC$formatting$hot_current_rules$height
#> [1] 400
#> 
#> $MC$formatting$hot_current_rules$no_rules
#> [1] "No Rules Defined"
#> 
#> 
#> $MC$formatting$hot_current_covariates
#> $MC$formatting$hot_current_covariates$width
#> [1] 800
#> 
#> $MC$formatting$hot_current_covariates$height
#> [1] 400
#> 
#> $MC$formatting$hot_current_covariates$no_covariates
#> [1] "Covariate not yet defined"
#> 
#> 
#> $MC$formatting$nsub
#> $MC$formatting$nsub$value
#> [1] 10
#> 
#> $MC$formatting$nsub$width
#> [1] 50
#> 
#> $MC$formatting$nsub$placeholder
#> [1] 10
#> 
#> $MC$formatting$nsub$tooltip
#> [1] "Number of sujbects in the current cohort. Set to 1 to simulate only the typical value."
#> 
#> $MC$formatting$nsub$tooltip_position
#> [1] "bottom"
#> 
#> 
#> $MC$formatting$visit_times
#> $MC$formatting$visit_times$value
#> [1] 0
#> 
#> $MC$formatting$visit_times$width
#> [1] 150
#> 
#> $MC$formatting$visit_times$placeholder
#> [1] "c(0, 7, 14, 21)"
#> 
#> $MC$formatting$visit_times$tooltip
#> [1] "Study visit times."
#> 
#> $MC$formatting$visit_times$tooltip_position
#> [1] "bottom"
#> 
#> 
#> $MC$formatting$trial_end
#> $MC$formatting$trial_end$value
#> [1] 100
#> 
#> $MC$formatting$trial_end$width
#> [1] 150
#> 
#> $MC$formatting$trial_end$placeholder
#> [1] "100"
#> 
#> $MC$formatting$trial_end$tooltip
#> [1] "Final simulation time point in simulation units."
#> 
#> $MC$formatting$trial_end$tooltip_position
#> [1] "bottom"
#> 
#> 
#> $MC$formatting$covariates
#> $MC$formatting$covariates$none_found
#> [1] "There were no coviaraites found in this model"
#> 
#> 
#> $MC$formatting$selected_covariate
#> $MC$formatting$selected_covariate$width
#> [1] 200
#> 
#> $MC$formatting$selected_covariate$tooltip
#> [1] "Pick covariate to define."
#> 
#> $MC$formatting$selected_covariate$tooltip_position
#> [1] "right"
#> 
#> 
#> $MC$formatting$rule_name
#> $MC$formatting$rule_name$width
#> [1] 300
#> 
#> $MC$formatting$rule_name$placeholder
#> [1] "first_dose"
#> 
#> $MC$formatting$rule_name$tooltip
#> [1] "This is a unique identifier for the current rule. It should start with a letter and can contain letters, numbers and underscores."
#> 
#> $MC$formatting$rule_name$tooltip_position
#> [1] "bottom"
#> 
#> 
#> $MC$formatting$time_scale
#> $MC$formatting$time_scale$width
#> [1] 75
#> 
#> $MC$formatting$time_scale$tooltip
#> [1] "Select the timescale to plot."
#> 
#> $MC$formatting$time_scale$tooltip_position
#> [1] "top"
#> 
#> 
#> $MC$formatting$tc_dim
#> $MC$formatting$tc_dim$width
#> [1] 75
#> 
#> $MC$formatting$tc_dim$default
#> [1] "d2x4"
#> 
#> $MC$formatting$tc_dim$tooltip
#> [1] "rows x cols for figures"
#> 
#> $MC$formatting$tc_dim$tooltip_position
#> [1] "top"
#> 
#> $MC$formatting$tc_dim$choices
#> $MC$formatting$tc_dim$choices$d4x4
#> $MC$formatting$tc_dim$choices$d4x4$verb
#> [1] "4x4"
#> 
#> $MC$formatting$tc_dim$choices$d4x4$nrow
#> [1] 4
#> 
#> $MC$formatting$tc_dim$choices$d4x4$ncol
#> [1] 4
#> 
#> 
#> $MC$formatting$tc_dim$choices$d2x4
#> $MC$formatting$tc_dim$choices$d2x4$verb
#> [1] "2x4"
#> 
#> $MC$formatting$tc_dim$choices$d2x4$nrow
#> [1] 2
#> 
#> $MC$formatting$tc_dim$choices$d2x4$ncol
#> [1] 4
#> 
#> 
#> $MC$formatting$tc_dim$choices$d2x2
#> $MC$formatting$tc_dim$choices$d2x2$verb
#> [1] "2x2"
#> 
#> $MC$formatting$tc_dim$choices$d2x2$nrow
#> [1] 2
#> 
#> $MC$formatting$tc_dim$choices$d2x2$ncol
#> [1] 2
#> 
#> 
#> $MC$formatting$tc_dim$choices$d1x1
#> $MC$formatting$tc_dim$choices$d1x1$verb
#> [1] "1x1"
#> 
#> $MC$formatting$tc_dim$choices$d1x1$nrow
#> [1] 1
#> 
#> $MC$formatting$tc_dim$choices$d1x1$ncol
#> [1] 1
#> 
#> 
#> 
#> 
#> $MC$formatting$dvcols
#> $MC$formatting$dvcols$width
#> [1] 150
#> 
#> $MC$formatting$dvcols$size
#> [1] 10
#> 
#> $MC$formatting$dvcols$tooltip
#> [1] "Select the different model outputs, states, etc to plot"
#> 
#> $MC$formatting$dvcols$tooltip_position
#> [1] "top"
#> 
#> $MC$formatting$dvcols$choices
#> $MC$formatting$dvcols$choices$outputs
#> $MC$formatting$dvcols$choices$outputs$verb
#> [1] "Outputs"
#> 
#> 
#> $MC$formatting$dvcols$choices$states
#> $MC$formatting$dvcols$choices$states$verb
#> [1] "States"
#> 
#> 
#> $MC$formatting$dvcols$choices$parameters
#> $MC$formatting$dvcols$choices$parameters$verb
#> [1] "Parameters"
#> 
#> 
#> $MC$formatting$dvcols$choices$secondary
#> $MC$formatting$dvcols$choices$secondary$verb
#> [1] "Secondary Parameters"
#> 
#> 
#> $MC$formatting$dvcols$choices$covariates
#> $MC$formatting$dvcols$choices$covariates$verb
#> [1] "Covariates"
#> 
#> 
#> 
#> 
#> $MC$formatting$evplot
#> $MC$formatting$evplot$width
#> [1] 150
#> 
#> $MC$formatting$evplot$tooltip
#> [1] "Select the events to plot"
#> 
#> $MC$formatting$evplot$tooltip_position
#> [1] "top"
#> 
#> $MC$formatting$evplot$default
#> [1] "dose"
#> 
#> $MC$formatting$evplot$choices
#> $MC$formatting$evplot$choices$dose
#> $MC$formatting$evplot$choices$dose$value
#> [1] 1
#> 
#> $MC$formatting$evplot$choices$dose$verb
#> [1] "Dose"
#> 
#> 
#> $MC$formatting$evplot$choices$set_state
#> $MC$formatting$evplot$choices$set_state$value
#> [1] 4
#> 
#> $MC$formatting$evplot$choices$set_state$verb
#> [1] "State Resets"
#> 
#> 
#> 
#> 
#> $MC$formatting$fpage
#> $MC$formatting$fpage$width
#> [1] 50
#> 
#> $MC$formatting$fpage$tooltip
#> [1] "Go to the selected output page"
#> 
#> $MC$formatting$fpage$tooltip_position
#> [1] "top"
#> 
#> 
#> 
#> $MC$labels
#> $MC$labels$current_element
#> NULL
#> 
#> $MC$labels$element_name
#> NULL
#> 
#> $MC$labels$save_btn
#> [1] "Save"
#> 
#> $MC$labels$runsim_btn
#> [1] "Simulate Cohort"
#> 
#> $MC$labels$running_sim
#> [1] "Running simulation. Be patient!"
#> 
#> $MC$labels$update_plot_btn
#> [1] "Update Plots"
#> 
#> $MC$labels$clip_btn
#> [1] "Code"
#> 
#> $MC$labels$copy_btn
#> [1] "Copy"
#> 
#> $MC$labels$del_btn
#> [1] "Delete"
#> 
#> $MC$labels$add_rule_btn
#> [1] "Add Rule"
#> 
#> $MC$labels$add_cov_btn
#> [1] "Add Covariate Details"
#> 
#> $MC$labels$new_btn
#> [1] "New"
#> 
#> $MC$labels$source_model
#> [1] "Select Model"
#> 
#> $MC$labels$dvcols
#> NULL
#> 
#> $MC$labels$evplot
#> NULL
#> 
#> $MC$labels$time_scale
#> NULL
#> 
#> $MC$labels$rule_type
#> [1] "Type of rule"
#> 
#> $MC$labels$rule_condition
#> [1] "Condition to trigger rule"
#> 
#> $MC$labels$action_dosing_state
#> [1] "Dosing into"
#> 
#> $MC$labels$action_dosing_values
#> [1] "Values"
#> 
#> $MC$labels$action_dosing_times
#> [1] "Times"
#> 
#> $MC$labels$action_manual_code
#> [1] "Code to evaluate"
#> 
#> $MC$labels$action_dosing_durations
#> [1] "Durations"
#> 
#> $MC$labels$action_set_state_state
#> [1] "State/compartment to reset"
#> 
#> $MC$labels$action_set_state_value
#> [1] "New value for state/compartment"
#> 
#> $MC$labels$nsub
#> [1] "N Subs"
#> 
#> $MC$labels$visit_times
#> [1] "Visit Times"
#> 
#> $MC$labels$trial_end
#> [1] "End of Trial"
#> 
#> $MC$labels$covariate_values
#> [1] "Current values"
#> 
#> $MC$labels$selected_covariate
#> [1] "Covariate"
#> 
#> $MC$labels$covariate_type
#> [1] "Type/Distribution"
#> 
#> $MC$labels$covariate_value
#> [1] "Values"
#> 
#> $MC$labels$switch_output_interactive
#> [1] "Interactive"
#> 
#> $MC$labels$switch_output_report
#> [1] "Report Preview"
#> 
#> $MC$labels$tab_res_tc_figure
#> [1] "Timecourse"
#> 
#> $MC$labels$tab_res_events_figure
#> [1] "Events"
#> 
#> $MC$labels$tab_sim_env
#> [1] "Simulation Environment"
#> 
#> $MC$labels$tab_chrt_ele_covs
#> [1] "Covariates"
#> 
#> $MC$labels$tab_chrt_ele_rules
#> [1] "Create Rules"
#> 
#> $MC$labels$tab_chrt_ele_trial
#> [1] "Trial Options"
#> 
#> $MC$labels$tab_chrt_ele_sim
#> [1] "Simulation Options"
#> 
#> $MC$labels$ds_tc
#> [1] "Timecourse"
#> 
#> $MC$labels$ds_ev
#> [1] "Events"
#> 
#> 
#> $MC$errors
#> $MC$errors$no_sim_found
#> [1] "No simulation available, you need to run the simulation first."
#> 
#> $MC$errors$bad_sim
#> [1] "There was a problem with the simulation."
#> 
#> $MC$errors$bad_plot
#> [1] "There was a problem plotting the simulation results."
#> 
#> $MC$errors$cts_no_fig
#> [1] "There are no figures to display. You must run the simulation first"
#> 
#> $MC$errors$no_mdl_found
#> [1] "There are no source models to use. You need to create a model to use this module."
#> 
#> 
#> $MC$tooltips
#> $MC$tooltips$include
#> [1] TRUE
#> 
#> $MC$tooltips$elements
#> [1] "Show cohort rules"
#> 
#> $MC$tooltips$show_code
#> [1] "Show cohort code"
#> 
#> $MC$tooltips$url_manual
#> [1] "https://ruminate.ubiquity.tools/articles/clinical_trial_simulation.html#example-manual-code-evaluation"
#> 
#> $MC$tooltips$url_rule_env
#> [1] "https://ruminate.ubiquity.tools/articles/clinical_trial_simulation.html#rule-evaluation-environment"
#> 
#> 
#> $MC$rule_env_content
#> [1] "uiele = tagList(tags$b(\"Simulation environment\"), \n                icon_link(href=state[[\"MC\"]][[\"tooltips\"]][[\"url_rule_env\"]]),\n                tags$br(),\n                \"The condition and actions (e.g., dose times, amounts,\n                durations) that are triggered are all\n                evaluated in an environment with different objects that\n                you can use. For details on this see the Clinical Trial Simulation vignette \", \n                icon_link(href=state[[\"MC\"]][[\"tooltips\"]][[\"url_rule_env\"]]), \n                \" for more information.\")\nuiele = tagList(uiele, \n                tags$br(),\n                tags$br(),\n                \"For the current system the following are available:\", \n                tags$br())\nuiele = tagList(uiele, tags$br())\nuiele = tagList(uiele, rx_details[[\"ht_info\"]])"
#> 
#> $MC$sim_config
#> $MC$sim_config$atol
#> $MC$sim_config$atol$group
#> [1] "ODE Solver"
#> 
#> $MC$sim_config$atol$label
#> [1] "Absolute tolerance"
#> 
#> $MC$sim_config$atol$tooltip
#> [1] "Absolute tolerance used by the ODE solver to determine if a good solution has been achieved; This is also used in the solved linear model to check if prior doses do not add anything to the solution."
#> 
#> $MC$sim_config$atol$uitype
#> [1] "text"
#> 
#> $MC$sim_config$atol$type
#> [1] "numeric"
#> 
#> $MC$sim_config$atol$value
#> [1] "1e-8"
#> 
#> $MC$sim_config$atol$options
#> NULL
#> 
#> $MC$sim_config$atol$use
#> [1] "rxSolve"
#> 
#> $MC$sim_config$atol$placeholder
#> [1] "1e-8"
#> 
#> 
#> $MC$sim_config$rtol
#> $MC$sim_config$rtol$group
#> [1] "ODE Solver"
#> 
#> $MC$sim_config$rtol$label
#> [1] "Relative tolerance"
#> 
#> $MC$sim_config$rtol$tooltip
#> [1] "Relative tolerance used by the ODE solver to determine if a good solution has been achieved. This is also used in the solved linear model to check if prior doses do not add anything to the solution."
#> 
#> $MC$sim_config$rtol$uitype
#> [1] "text"
#> 
#> $MC$sim_config$rtol$type
#> [1] "numeric"
#> 
#> $MC$sim_config$rtol$value
#> [1] "1e-6"
#> 
#> $MC$sim_config$rtol$options
#> NULL
#> 
#> $MC$sim_config$rtol$use
#> [1] "rxSolve"
#> 
#> $MC$sim_config$rtol$placeholder
#> [1] "1e-6"
#> 
#> 
#> $MC$sim_config$sigdig
#> $MC$sim_config$sigdig$group
#> [1] "ODE Solver"
#> 
#> $MC$sim_config$sigdig$label
#> [1] "Significant digits"
#> 
#> $MC$sim_config$sigdig$tooltip
#> [1] "Specifies the \"significant digits\" that the ode solving requests. When specified this controls the relative and absolute tolerances of the ODE solvers. By default the tolerance is 0.5*10^(-sigdig-2) for regular ODEs. For the sensitivity equations the default is ⁠0.5*10\\^(-sigdig-1.5)⁠ (sensitivity changes only applicable for liblsoda). This also controls the atol/rtol of the steady state solutions. The ssAtol/ssRtol is ⁠0.5*10\\^(-sigdig)⁠ and for the sensitivities ⁠0.5*10\\^(-sigdig+0.625)⁠. By default this is unspecified (NULL) and uses the standard atol/rtol."
#> 
#> $MC$sim_config$sigdig$uitype
#> [1] "text"
#> 
#> $MC$sim_config$sigdig$type
#> [1] "numeric"
#> 
#> $MC$sim_config$sigdig$value
#> [1] "NULL"
#> 
#> $MC$sim_config$sigdig$options
#> NULL
#> 
#> $MC$sim_config$sigdig$use
#> [1] "rxSolve"
#> 
#> $MC$sim_config$sigdig$placeholder
#> [1] "NULL"
#> 
#> 
#> $MC$sim_config$seed
#> $MC$sim_config$seed$group
#> [1] "Misc"
#> 
#> $MC$sim_config$seed$label
#> [1] "Random Seed"
#> 
#> $MC$sim_config$seed$tooltip
#> [1] "Integer value to set the seed for the random number generator"
#> 
#> $MC$sim_config$seed$uitype
#> [1] "text"
#> 
#> $MC$sim_config$seed$type
#> [1] "numeric"
#> 
#> $MC$sim_config$seed$value
#> [1] "5446"
#> 
#> $MC$sim_config$seed$options
#> NULL
#> 
#> $MC$sim_config$seed$use
#> [1] "Misc"
#> 
#> $MC$sim_config$seed$placeholder
#> [1] "5446"
#> 
#> 
#> $MC$sim_config$nsteps
#> $MC$sim_config$nsteps$group
#> [1] "Misc"
#> 
#> $MC$sim_config$nsteps$label
#> [1] "Time Steps"
#> 
#> $MC$sim_config$nsteps$tooltip
#> [1] "Integer value representing the number of time steps to add between zero and the end of trial. A larger value will give smoother curves but it will also take more time to simulate."
#> 
#> $MC$sim_config$nsteps$uitype
#> [1] "text"
#> 
#> $MC$sim_config$nsteps$type
#> [1] "numeric"
#> 
#> $MC$sim_config$nsteps$value
#> [1] "200"
#> 
#> $MC$sim_config$nsteps$options
#> NULL
#> 
#> $MC$sim_config$nsteps$use
#> [1] "Misc"
#> 
#> $MC$sim_config$nsteps$placeholder
#> [1] "200"
#> 
#> 
#> $MC$sim_config$preamble
#> $MC$sim_config$preamble$group
#> [1] "Rule Environment Preamble"
#> 
#> $MC$sim_config$preamble$label
#> NULL
#> 
#> $MC$sim_config$preamble$tooltip
#> [1] "Optional user-defined code to be executed in the rule-evaluation environment. You can create user-defined functions here."
#> 
#> $MC$sim_config$preamble$uitype
#> [1] "textarea"
#> 
#> $MC$sim_config$preamble$type
#> [1] "character"
#> 
#> $MC$sim_config$preamble$value
#> NULL
#> 
#> $MC$sim_config$preamble$options
#> NULL
#> 
#> $MC$sim_config$preamble$use
#> [1] "rules"
#> 
#> $MC$sim_config$preamble$placeholder
#> [1] "my_func = function(id=NULL){\n\n}"
#> 
#> 
#> 
#> $MC$covariate_generation
#> $MC$covariate_generation$tooltip_position
#> [1] "right"
#> 
#> $MC$covariate_generation$width
#> [1] 200
#> 
#> $MC$covariate_generation$types
#> $MC$covariate_generation$types$discrete
#> $MC$covariate_generation$types$discrete$choice
#> [1] "Select from discrete values"
#> 
#> $MC$covariate_generation$types$discrete$type
#> [1] "discrete"
#> 
#> $MC$covariate_generation$types$discrete$placeholder
#> [1] "0, 1, 2"
#> 
#> $MC$covariate_generation$types$discrete$tooltip
#> [1] "Provide a list of possible discrete values and these will be randomly selected when genreating subjects."
#> 
#> 
#> $MC$covariate_generation$types$fixed
#> $MC$covariate_generation$types$fixed$choice
#> [1] "Fix at value"
#> 
#> $MC$covariate_generation$types$fixed$type
#> [1] "fixed"
#> 
#> $MC$covariate_generation$types$fixed$placeholder
#> [1] "1"
#> 
#> $MC$covariate_generation$types$fixed$tooltip
#> [1] "Fix the covariate at a specific value."
#> 
#> 
#> $MC$covariate_generation$types$cont_random
#> $MC$covariate_generation$types$cont_random$choice
#> [1] "Continuous/random in range"
#> 
#> $MC$covariate_generation$types$cont_random$type
#> [1] "continuous"
#> 
#> $MC$covariate_generation$types$cont_random$sampling
#> [1] "random"
#> 
#> $MC$covariate_generation$types$cont_random$placeholder
#> [1] "0,1"
#> 
#> $MC$covariate_generation$types$cont_random$tooltip
#> [1] "Sample randomly from within the specified range."
#> 
#> 
#> $MC$covariate_generation$types$cont_normal
#> $MC$covariate_generation$types$cont_normal$choice
#> [1] "Sample normally"
#> 
#> $MC$covariate_generation$types$cont_normal$type
#> [1] "continuous"
#> 
#> $MC$covariate_generation$types$cont_normal$sampling
#> [1] "normal"
#> 
#> $MC$covariate_generation$types$cont_normal$placeholder
#> [1] "mean, variance"
#> 
#> $MC$covariate_generation$types$cont_normal$tooltip
#> [1] "Sample from normal distribution provided a mean and variance"
#> 
#> 
#> $MC$covariate_generation$types$cont_lognormal
#> $MC$covariate_generation$types$cont_lognormal$choice
#> [1] "Sample log-normally"
#> 
#> $MC$covariate_generation$types$cont_lognormal$type
#> [1] "continuous"
#> 
#> $MC$covariate_generation$types$cont_lognormal$sampling
#> [1] "log-normal"
#> 
#> $MC$covariate_generation$types$cont_lognormal$placeholder
#> [1] "mean, variance"
#> 
#> $MC$covariate_generation$types$cont_lognormal$tooltip
#> [1] "Sample from log-normal distribution provided a mean and variance"
#> 
#> 
#> 
#> 
#> 
#> $CTS
#> $CTS$button_counters
#> $CTS$button_counters$button_clk_runsim
#> [1] 0
#> 
#> $CTS$button_counters$button_clk_update_plot
#> [1] 0
#> 
#> $CTS$button_counters$button_clk_save
#> [1] 0
#> 
#> $CTS$button_counters$button_clk_clip
#> [1] 0
#> 
#> $CTS$button_counters$button_clk_del
#> [1] 0
#> 
#> $CTS$button_counters$button_clk_copy
#> [1] 0
#> 
#> $CTS$button_counters$button_clk_new
#> [1] 0
#> 
#> $CTS$button_counters$button_clk_add_cov
#> [1] 0
#> 
#> $CTS$button_counters$button_clk_add_rule
#> [1] 0
#> 
#> 
#> $CTS$ui_hold
#> $CTS$ui_hold$button_clk_runsim
#> [1] FALSE
#> 
#> $CTS$ui_hold$button_clk_update_plot
#> [1] FALSE
#> 
#> $CTS$ui_hold$button_clk_save
#> [1] FALSE
#> 
#> $CTS$ui_hold$button_clk_clip
#> [1] FALSE
#> 
#> $CTS$ui_hold$button_clk_del
#> [1] FALSE
#> 
#> $CTS$ui_hold$button_clk_copy
#> [1] FALSE
#> 
#> $CTS$ui_hold$button_clk_new
#> [1] FALSE
#> 
#> $CTS$ui_hold$button_clk_add_cov
#> [1] FALSE
#> 
#> $CTS$ui_hold$button_clk_add_rule
#> [1] FALSE
#> 
#> $CTS$ui_hold$element_name
#> [1] FALSE
#> 
#> $CTS$ui_hold$nsub
#> [1] FALSE
#> 
#> $CTS$ui_hold$fpage
#> [1] FALSE
#> 
#> $CTS$ui_hold$dvcols
#> [1] FALSE
#> 
#> $CTS$ui_hold$time_scale
#> [1] FALSE
#> 
#> $CTS$ui_hold$tc_dim
#> [1] FALSE
#> 
#> $CTS$ui_hold$evplot
#> [1] FALSE
#> 
#> $CTS$ui_hold$visit_times
#> [1] FALSE
#> 
#> $CTS$ui_hold$trial_end
#> [1] FALSE
#> 
#> $CTS$ui_hold$rule_condition
#> [1] FALSE
#> 
#> $CTS$ui_hold$action_dosing_state
#> [1] FALSE
#> 
#> $CTS$ui_hold$action_dosing_values
#> [1] FALSE
#> 
#> $CTS$ui_hold$action_dosing_times
#> [1] FALSE
#> 
#> $CTS$ui_hold$action_dosing_durations
#> [1] FALSE
#> 
#> $CTS$ui_hold$action_set_state_state
#> [1] FALSE
#> 
#> $CTS$ui_hold$action_set_state_value
#> [1] FALSE
#> 
#> $CTS$ui_hold$action_manual_code
#> [1] FALSE
#> 
#> $CTS$ui_hold$cts_config_atol
#> [1] FALSE
#> 
#> $CTS$ui_hold$cts_config_rtol
#> [1] FALSE
#> 
#> $CTS$ui_hold$cts_config_sigdig
#> [1] FALSE
#> 
#> $CTS$ui_hold$cts_config_seed
#> [1] FALSE
#> 
#> $CTS$ui_hold$cts_config_nsteps
#> [1] FALSE
#> 
#> $CTS$ui_hold$cts_config_preamble
#> [1] FALSE
#> 
#> $CTS$ui_hold$rule_type
#> [1] FALSE
#> 
#> $CTS$ui_hold$rule_name
#> [1] FALSE
#> 
#> $CTS$ui_hold$source_model
#> [1] FALSE
#> 
#> $CTS$ui_hold$hot_current_rules
#> [1] FALSE
#> 
#> $CTS$ui_hold$covariate_type_selected
#> [1] FALSE
#> 
#> $CTS$ui_hold$covariate_value
#> [1] FALSE
#> 
#> $CTS$ui_hold$selected_covariate
#> [1] FALSE
#> 
#> $CTS$ui_hold$switch_output
#> [1] FALSE
#> 
#> $CTS$ui_hold$element_selection
#> [1] FALSE
#> 
#> 
#> $CTS$ui_ids
#>  [1] "button_clk_runsim"       "button_clk_update_plot" 
#>  [3] "button_clk_save"         "button_clk_clip"        
#>  [5] "button_clk_del"          "button_clk_copy"        
#>  [7] "button_clk_new"          "button_clk_add_cov"     
#>  [9] "button_clk_add_rule"     "element_name"           
#> [11] "nsub"                    "fpage"                  
#> [13] "dvcols"                  "time_scale"             
#> [15] "tc_dim"                  "evplot"                 
#> [17] "visit_times"             "trial_end"              
#> [19] "rule_condition"          "action_dosing_state"    
#> [21] "action_dosing_values"    "action_dosing_times"    
#> [23] "action_dosing_durations" "action_set_state_state" 
#> [25] "action_set_state_value"  "action_manual_code"     
#> [27] "cts_config_atol"         "cts_config_rtol"        
#> [29] "cts_config_sigdig"       "cts_config_seed"        
#> [31] "cts_config_nsteps"       "cts_config_preamble"    
#> [33] "rule_type"               "rule_name"              
#> [35] "source_model"            "hot_current_rules"      
#> [37] "covariate_type_selected" "covariate_value"        
#> [39] "selected_covariate"      "switch_output"          
#> [41] "element_selection"      
#> 
#> $CTS$isgood
#> [1] TRUE
#> 
#> $CTS$rule_ui_map
#> $CTS$rule_ui_map$dose
#> $CTS$rule_ui_map$dose$name
#> [1] "rule_name"
#> 
#> $CTS$rule_ui_map$dose$type
#> [1] "rule_type"
#> 
#> $CTS$rule_ui_map$dose$condition
#> [1] "rule_condition"
#> 
#> $CTS$rule_ui_map$dose$state
#> [1] "action_dosing_state"
#> 
#> $CTS$rule_ui_map$dose$values
#> [1] "action_dosing_values"
#> 
#> $CTS$rule_ui_map$dose$times
#> [1] "action_dosing_times"
#> 
#> $CTS$rule_ui_map$dose$durations
#> [1] "action_dosing_durations"
#> 
#> 
#> $CTS$rule_ui_map$`set state`
#> $CTS$rule_ui_map$`set state`$name
#> [1] "rule_name"
#> 
#> $CTS$rule_ui_map$`set state`$type
#> [1] "rule_type"
#> 
#> $CTS$rule_ui_map$`set state`$condition
#> [1] "rule_condition"
#> 
#> $CTS$rule_ui_map$`set state`$state
#> [1] "action_set_state"
#> 
#> $CTS$rule_ui_map$`set state`$value
#> [1] "action_state_values"
#> 
#> 
#> $CTS$rule_ui_map$manual
#> $CTS$rule_ui_map$manual$name
#> [1] "rule_name"
#> 
#> $CTS$rule_ui_map$manual$type
#> [1] "rule_type"
#> 
#> $CTS$rule_ui_map$manual$condition
#> [1] "rule_condition"
#> 
#> $CTS$rule_ui_map$manual$code
#> [1] "action_manual_code"
#> 
#> 
#> 
#> $CTS$MDL
#> $CTS$MDL$isgood
#> [1] TRUE
#> 
#> $CTS$MDL$hasmdl
#> [1] TRUE
#> 
#> $CTS$MDL$catalog
#>                   label      object MOD_TYPE id idx
#> 1 One compartment model MB_obj_1_rx       MB MB   1
#> 2          PK Biomarker MB_obj_2_rx       MB MB   2
#>                           checksum                      MDLchecksum
#> 1 defa767de59af224ca683c7c6cf2983a dabcf0060488da635fd86bd7199eeaac
#> 2 defa767de59af224ca683c7c6cf2983a 285c2f14ea0a75939504345a76fa647f
#>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             code
#> 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         MB_obj_1_fcn = function () \n{\n    description <- "One compartment PK model with linear clearance using differential equations"\n    ini({\n        lka <- 0.45\n        label("Absorption rate (Ka)")\n        lcl <- 1\n        label("Clearance (CL)")\n        lvc <- 3.45\n        label("Central volume of distribution (V)")\n        propSd <- c(0, 0.5)\n        label("Proportional residual error (fraction)")\n        etalcl ~ 0.1\n        etalvc ~ 0.01\n    })\n    model({\n        ka <- exp(lka)\n        cl <- exp(lcl + etalcl)\n        vc <- exp(lvc + etalvc)\n        kel <- cl/vc\n        d/dt(depot) <- -ka * depot\n        d/dt(central) <- ka * depot - kel * central\n        Cc <- central/vc\n        Cc ~ prop(propSd)\n    })\n}\n\nMB_obj_1_rx =  rxode2::rxode2(MB_obj_1_fcn)\n\nMB_obj_1_ts = list(\n  system  = "weeks",\n  details = \n    list(months = list(verb = "Months", conv = 4.13359788359788e-07), \n        weeks = list(verb = "Weeks", conv = 1.65343915343915e-06), \n        days = list(verb = "Days", conv = 1.15740740740741e-05), \n        hours = list(verb = "Hours", conv = 0.000277777777777778))\n)
#> 2 MB_obj_2_fcn = function () \n{\n    ini({\n        TV_F1 <- fix(2.22044604925031e-16, 0.744, Inf)\n        TV_ka <- c(2.22044604925031e-16, 0.282, Inf)\n        TV_CL <- c(-36.0436533891172, -1.6094379124341, 709.782712893384)\n        TV_Vc <- c(-36.0436533891172, 1.28370777234479, 709.782712893384)\n        TV_Vp <- c(-36.0436533891172, 1.01160091167848, 709.782712893384)\n        TV_Q <- c(-36.0436533891172, -0.29169009384932, 709.782712893384)\n        TV_MW <- fix(2.22044604925031e-16, 140, Inf)\n        TV_BM_IC <- c(2.22044604925031e-16, 1000, Inf)\n        TV_kdeg_BM <- fix(2.22044604925031e-16, 0.1, Inf)\n        TV_Emax <- c(2.22044604925031e-16, 100, Inf)\n        TV_EC50 <- fix(2.22044604925031e-16, 300, Inf)\n        prop_err_PK <- c(2.22044604925031e-16, 0.1, Inf)\n        add_err_PK <- c(2.22044604925031e-16, 0.1, Inf)\n        add_err_BM <- c(2.22044604925031e-16, 0.1, Inf)\n        ETAka ~ 0.416\n        ETACL ~ 0.09875\n        ETAVc ~ c(0.0786, 0.116)\n        ETAVp ~ c(0.0619, 0.0377, 0.0789)\n        ETAQ ~ 0.699\n        ETABM_IC ~ 0.05\n        ETAEmax ~ 0.1\n    })\n    model({\n        F1 = TV_F1\n        ka = TV_ka * exp(ETAka)\n        CL = exp(TV_CL) * exp(ETACL)\n        Vc = exp(TV_Vc) * exp(ETAVc)\n        Cc = Ac/(Vc)\n        Vp = exp(TV_Vp) * exp(ETAVp)\n        Q = exp(TV_Q) * exp(ETAQ)\n        MW = TV_MW\n        BM_IC = TV_BM_IC * exp(ETABM_IC)\n        kdeg_BM = TV_kdeg_BM\n        Emax = TV_Emax * exp(ETAEmax)\n        EC50 = TV_EC50\n        Dinf = 0\n        WTTV = 70\n        CL_IND = CL * (1 + SEX_ID * 0.1) * (1 + SUBTYPE_ID * \n            0.1)\n        kel = CL_IND/Vc * ((WT/WTTV))^(-0.35)\n        kcp = Q/Vc * ((WT/WTTV))^(-0.35)\n        kpc = Q/Vp * ((WT/WTTV))^(-0.35)\n        ksyn_BM = kdeg_BM * BM_IC\n        STIM = 1 + Emax * Cc/(EC50 + Cc)\n        BM(0) = BM_IC\n        d/dt(At) = (-ka * At)\n        d/dt(Ac) = ((ka * At * F1/Vc - kel * Cc - kcp * Cc + \n            kpc * Cp * Vp/Vc + Dinf/Vc)) * Vc\n        d/dt(Cp) = (kcp * Cc * Vc/Vp - kpc * Cp)\n        d/dt(BM) = ksyn_BM * STIM - (kdeg_BM * BM)\n        C_ng_ml = Cc * MW\n        C_ng_ml ~ add(add_err_PK) + prop(prop_err_PK)\n        BM_obs = BM\n        BM_obs ~ add(add_err_BM)\n    })\n}\n\nMB_obj_2_rx =  rxode2::rxode2(MB_obj_2_fcn)\n\nMB_obj_2_ts = list(\n  system  = "weeks",\n  details = \n    list(months = list(verb = "Months", conv = 4.13359788359788e-07), \n        weeks = list(verb = "Weeks", conv = 1.65343915343915e-06), \n        days = list(verb = "Days", conv = 1.15740740740741e-05), \n        hours = list(verb = "Hours", conv = 0.000277777777777778))\n)
#> 
#> $CTS$MDL$modules
#> $CTS$MDL$modules$MB
#> $CTS$MDL$modules$MB$MB
#> [1] "defa767de59af224ca683c7c6cf2983a"
#> 
#> 
#> 
#> $CTS$MDL$mdl
#> $CTS$MDL$mdl$MB_obj_1_rx
#> $CTS$MDL$mdl$MB_obj_1_rx$label
#> [1] "One compartment model"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$MOD_TYPE
#> [1] "MB"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$id
#> [1] "MB"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$idx
#> [1] 1
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$months
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$months$verb
#> [1] "Months"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$months$conv
#> [1] 4.133598e-07
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$weeks
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$weeks$verb
#> [1] "Weeks"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$weeks$conv
#> [1] 1.653439e-06
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$days
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$days$verb
#> [1] "Days"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$days$conv
#> [1] 1.157407e-05
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$hours
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$hours$verb
#> [1] "Hours"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_details$hours$conv
#> [1] 0.0002777778
#> 
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$rx_obj
#>  ── rxode2-based free-form 2-cmt ODE model ────────────────────────────────────── 
#>  ── Initalization: ──  
#> Fixed Effects ($theta): 
#>    lka    lcl    lvc propSd 
#>   0.45   1.00   3.45   0.50 
#> 
#> Omega ($omega): 
#>        etalcl etalvc
#> etalcl    0.1   0.00
#> etalvc    0.0   0.01
#> 
#> States ($state or $stateDf): 
#>   Compartment Number Compartment Name
#> 1                  1            depot
#> 2                  2          central
#>  ── μ-referencing ($muRefTable): ──  
#>   theta    eta level
#> 1   lcl etalcl    id
#> 2   lvc etalvc    id
#> 
#>  ── Model (Normalized Syntax): ── 
#> function() {
#>     description <- "One compartment PK model with linear clearance using differential equations"
#>     ini({
#>         lka <- 0.45
#>         label("Absorption rate (Ka)")
#>         lcl <- 1
#>         label("Clearance (CL)")
#>         lvc <- 3.45
#>         label("Central volume of distribution (V)")
#>         propSd <- c(0, 0.5)
#>         label("Proportional residual error (fraction)")
#>         etalcl ~ 0.1
#>         etalvc ~ 0.01
#>     })
#>     model({
#>         ka <- exp(lka)
#>         cl <- exp(lcl + etalcl)
#>         vc <- exp(lvc + etalvc)
#>         kel <- cl/vc
#>         d/dt(depot) <- -ka * depot
#>         d/dt(central) <- ka * depot - kel * central
#>         Cc <- central/vc
#>         Cc ~ prop(propSd)
#>     })
#> }
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$rx_obj_name
#> [1] "MB_obj_1_rx"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$system
#> [1] "weeks"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$months
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$months$verb
#> [1] "Months"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$months$conv
#> [1] 4.133598e-07
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$weeks
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$weeks$verb
#> [1] "Weeks"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$weeks$conv
#> [1] 1.653439e-06
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$days
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$days$verb
#> [1] "Days"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$days$conv
#> [1] 1.157407e-05
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$hours
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$hours$verb
#> [1] "Hours"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj$details$hours$conv
#> [1] 0.0002777778
#> 
#> 
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$ts_obj_name
#> [1] "MB_obj_1_ts"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$fcn_def
#> [1] "function () \n{\n    description <- \"One compartment PK model with linear clearance using differential equations\"\n    ini({\n        lka <- 0.45\n        label(\"Absorption rate (Ka)\")\n        lcl <- 1\n        label(\"Clearance (CL)\")\n        lvc <- 3.45\n        label(\"Central volume of distribution (V)\")\n        propSd <- c(0, 0.5)\n        label(\"Proportional residual error (fraction)\")\n        etalcl ~ 0.1\n        etalvc ~ 0.01\n    })\n    model({\n        ka <- exp(lka)\n        cl <- exp(lcl + etalcl)\n        vc <- exp(lvc + etalvc)\n        kel <- cl/vc\n        d/dt(depot) <- -ka * depot\n        d/dt(central) <- ka * depot - kel * central\n        Cc <- central/vc\n        Cc ~ prop(propSd)\n    })\n}"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$MDLMETA
#> [1] "adding IIV to lvc"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$code
#> [1] "MB_obj_1_fcn = function () \n{\n    description <- \"One compartment PK model with linear clearance using differential equations\"\n    ini({\n        lka <- 0.45\n        label(\"Absorption rate (Ka)\")\n        lcl <- 1\n        label(\"Clearance (CL)\")\n        lvc <- 3.45\n        label(\"Central volume of distribution (V)\")\n        propSd <- c(0, 0.5)\n        label(\"Proportional residual error (fraction)\")\n        etalcl ~ 0.1\n        etalvc ~ 0.01\n    })\n    model({\n        ka <- exp(lka)\n        cl <- exp(lcl + etalcl)\n        vc <- exp(lvc + etalvc)\n        kel <- cl/vc\n        d/dt(depot) <- -ka * depot\n        d/dt(central) <- ka * depot - kel * central\n        Cc <- central/vc\n        Cc ~ prop(propSd)\n    })\n}\n\nMB_obj_1_rx =  rxode2::rxode2(MB_obj_1_fcn)\n\nMB_obj_1_ts = list(\n  system  = \"weeks\",\n  details = \n    list(months = list(verb = \"Months\", conv = 4.13359788359788e-07), \n        weeks = list(verb = \"Weeks\", conv = 1.65343915343915e-06), \n        days = list(verb = \"Days\", conv = 1.15740740740741e-05), \n        hours = list(verb = \"Hours\", conv = 0.000277777777777778))\n)"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$checksum
#> [1] "defa767de59af224ca683c7c6cf2983a"
#> 
#> $CTS$MDL$mdl$MB_obj_1_rx$MDLchecksum
#> [1] "dabcf0060488da635fd86bd7199eeaac"
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx
#> $CTS$MDL$mdl$MB_obj_2_rx$label
#> [1] "PK Biomarker"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$MOD_TYPE
#> [1] "MB"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$id
#> [1] "MB"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$idx
#> [1] 2
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$months
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$months$verb
#> [1] "Months"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$months$conv
#> [1] 4.133598e-07
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$weeks
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$weeks$verb
#> [1] "Weeks"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$weeks$conv
#> [1] 1.653439e-06
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$days
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$days$verb
#> [1] "Days"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$days$conv
#> [1] 1.157407e-05
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$hours
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$hours$verb
#> [1] "Hours"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_details$hours$conv
#> [1] 0.0002777778
#> 
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$rx_obj
#>  ── rxode2-based free-form 4-cmt ODE model ────────────────────────────────────── 
#>  ── Initalization: ──  
#> Fixed Effects ($theta): 
#>        TV_F1        TV_ka        TV_CL        TV_Vc        TV_Vp         TV_Q 
#>    0.7440000    0.2820000   -1.6094379    1.2837078    1.0116009   -0.2916901 
#>        TV_MW     TV_BM_IC   TV_kdeg_BM      TV_Emax      TV_EC50  prop_err_PK 
#>  140.0000000 1000.0000000    0.1000000  100.0000000  300.0000000    0.1000000 
#>   add_err_PK   add_err_BM 
#>    0.1000000    0.1000000 
#> 
#> Omega ($omega): 
#>          ETAka   ETACL  ETAVc  ETAVp  ETAQ ETABM_IC ETAEmax
#> ETAka    0.416 0.00000 0.0000 0.0000 0.000     0.00     0.0
#> ETACL    0.000 0.09875 0.0786 0.0619 0.000     0.00     0.0
#> ETAVc    0.000 0.07860 0.1160 0.0377 0.000     0.00     0.0
#> ETAVp    0.000 0.06190 0.0377 0.0789 0.000     0.00     0.0
#> ETAQ     0.000 0.00000 0.0000 0.0000 0.699     0.00     0.0
#> ETABM_IC 0.000 0.00000 0.0000 0.0000 0.000     0.05     0.0
#> ETAEmax  0.000 0.00000 0.0000 0.0000 0.000     0.00     0.1
#> 
#> States ($state or $stateDf): 
#>   Compartment Number Compartment Name
#> 1                  1               At
#> 2                  2               Ac
#> 3                  3               Cp
#> 4                  4               BM
#>  ── Multiple Endpoint Model ($multipleEndpoint): ──  
#>      variable                    cmt                    dvid*
#> 1 C_ng_ml ~ … cmt='C_ng_ml' or cmt=5 dvid='C_ng_ml' or dvid=1
#> 2  BM_obs ~ …  cmt='BM_obs' or cmt=6  dvid='BM_obs' or dvid=2
#>   * If dvids are outside this range, all dvids are re-numered sequentially, ie 1,7, 10 becomes 1,2,3 etc
#> 
#>  ── Model (Normalized Syntax): ── 
#> function() {
#>     ini({
#>         TV_F1 <- fix(2.22044604925031e-16, 0.744, Inf)
#>         TV_ka <- c(2.22044604925031e-16, 0.282, Inf)
#>         TV_CL <- c(-36.0436533891172, -1.6094379124341, 709.782712893384)
#>         TV_Vc <- c(-36.0436533891172, 1.28370777234479, 709.782712893384)
#>         TV_Vp <- c(-36.0436533891172, 1.01160091167848, 709.782712893384)
#>         TV_Q <- c(-36.0436533891172, -0.29169009384932, 709.782712893384)
#>         TV_MW <- fix(2.22044604925031e-16, 140, Inf)
#>         TV_BM_IC <- c(2.22044604925031e-16, 1000, Inf)
#>         TV_kdeg_BM <- fix(2.22044604925031e-16, 0.1, Inf)
#>         TV_Emax <- c(2.22044604925031e-16, 100, Inf)
#>         TV_EC50 <- fix(2.22044604925031e-16, 300, Inf)
#>         prop_err_PK <- c(2.22044604925031e-16, 0.1, Inf)
#>         add_err_PK <- c(2.22044604925031e-16, 0.1, Inf)
#>         add_err_BM <- c(2.22044604925031e-16, 0.1, Inf)
#>         ETAka ~ 0.416
#>         ETACL ~ 0.09875
#>         ETAVc ~ c(0.0786, 0.116)
#>         ETAVp ~ c(0.0619, 0.0377, 0.0789)
#>         ETAQ ~ 0.699
#>         ETABM_IC ~ 0.05
#>         ETAEmax ~ 0.1
#>     })
#>     model({
#>         F1 = TV_F1
#>         ka = TV_ka * exp(ETAka)
#>         CL = exp(TV_CL) * exp(ETACL)
#>         Vc = exp(TV_Vc) * exp(ETAVc)
#>         Cc = Ac/(Vc)
#>         Vp = exp(TV_Vp) * exp(ETAVp)
#>         Q = exp(TV_Q) * exp(ETAQ)
#>         MW = TV_MW
#>         BM_IC = TV_BM_IC * exp(ETABM_IC)
#>         kdeg_BM = TV_kdeg_BM
#>         Emax = TV_Emax * exp(ETAEmax)
#>         EC50 = TV_EC50
#>         Dinf = 0
#>         WTTV = 70
#>         CL_IND = CL * (1 + SEX_ID * 0.1) * (1 + SUBTYPE_ID * 
#>             0.1)
#>         kel = CL_IND/Vc * ((WT/WTTV))^(-0.35)
#>         kcp = Q/Vc * ((WT/WTTV))^(-0.35)
#>         kpc = Q/Vp * ((WT/WTTV))^(-0.35)
#>         ksyn_BM = kdeg_BM * BM_IC
#>         STIM = 1 + Emax * Cc/(EC50 + Cc)
#>         BM(0) = BM_IC
#>         d/dt(At) = (-ka * At)
#>         d/dt(Ac) = ((ka * At * F1/Vc - kel * Cc - kcp * Cc + 
#>             kpc * Cp * Vp/Vc + Dinf/Vc)) * Vc
#>         d/dt(Cp) = (kcp * Cc * Vc/Vp - kpc * Cp)
#>         d/dt(BM) = ksyn_BM * STIM - (kdeg_BM * BM)
#>         C_ng_ml = Cc * MW
#>         C_ng_ml ~ add(add_err_PK) + prop(prop_err_PK)
#>         BM_obs = BM
#>         BM_obs ~ add(add_err_BM)
#>     })
#> }
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$rx_obj_name
#> [1] "MB_obj_2_rx"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$system
#> [1] "weeks"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$months
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$months$verb
#> [1] "Months"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$months$conv
#> [1] 4.133598e-07
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$weeks
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$weeks$verb
#> [1] "Weeks"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$weeks$conv
#> [1] 1.653439e-06
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$days
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$days$verb
#> [1] "Days"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$days$conv
#> [1] 1.157407e-05
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$hours
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$hours$verb
#> [1] "Hours"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj$details$hours$conv
#> [1] 0.0002777778
#> 
#> 
#> 
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$ts_obj_name
#> [1] "MB_obj_2_ts"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$fcn_def
#> [1] "function () \n{\n    ini({\n        TV_F1 <- fix(2.22044604925031e-16, 0.744, Inf)\n        TV_ka <- c(2.22044604925031e-16, 0.282, Inf)\n        TV_CL <- c(-36.0436533891172, -1.6094379124341, 709.782712893384)\n        TV_Vc <- c(-36.0436533891172, 1.28370777234479, 709.782712893384)\n        TV_Vp <- c(-36.0436533891172, 1.01160091167848, 709.782712893384)\n        TV_Q <- c(-36.0436533891172, -0.29169009384932, 709.782712893384)\n        TV_MW <- fix(2.22044604925031e-16, 140, Inf)\n        TV_BM_IC <- c(2.22044604925031e-16, 1000, Inf)\n        TV_kdeg_BM <- fix(2.22044604925031e-16, 0.1, Inf)\n        TV_Emax <- c(2.22044604925031e-16, 100, Inf)\n        TV_EC50 <- fix(2.22044604925031e-16, 300, Inf)\n        prop_err_PK <- c(2.22044604925031e-16, 0.1, Inf)\n        add_err_PK <- c(2.22044604925031e-16, 0.1, Inf)\n        add_err_BM <- c(2.22044604925031e-16, 0.1, Inf)\n        ETAka ~ 0.416\n        ETACL ~ 0.09875\n        ETAVc ~ c(0.0786, 0.116)\n        ETAVp ~ c(0.0619, 0.0377, 0.0789)\n        ETAQ ~ 0.699\n        ETABM_IC ~ 0.05\n        ETAEmax ~ 0.1\n    })\n    model({\n        F1 = TV_F1\n        ka = TV_ka * exp(ETAka)\n        CL = exp(TV_CL) * exp(ETACL)\n        Vc = exp(TV_Vc) * exp(ETAVc)\n        Cc = Ac/(Vc)\n        Vp = exp(TV_Vp) * exp(ETAVp)\n        Q = exp(TV_Q) * exp(ETAQ)\n        MW = TV_MW\n        BM_IC = TV_BM_IC * exp(ETABM_IC)\n        kdeg_BM = TV_kdeg_BM\n        Emax = TV_Emax * exp(ETAEmax)\n        EC50 = TV_EC50\n        Dinf = 0\n        WTTV = 70\n        CL_IND = CL * (1 + SEX_ID * 0.1) * (1 + SUBTYPE_ID * \n            0.1)\n        kel = CL_IND/Vc * ((WT/WTTV))^(-0.35)\n        kcp = Q/Vc * ((WT/WTTV))^(-0.35)\n        kpc = Q/Vp * ((WT/WTTV))^(-0.35)\n        ksyn_BM = kdeg_BM * BM_IC\n        STIM = 1 + Emax * Cc/(EC50 + Cc)\n        BM(0) = BM_IC\n        d/dt(At) = (-ka * At)\n        d/dt(Ac) = ((ka * At * F1/Vc - kel * Cc - kcp * Cc + \n            kpc * Cp * Vp/Vc + Dinf/Vc)) * Vc\n        d/dt(Cp) = (kcp * Cc * Vc/Vp - kpc * Cp)\n        d/dt(BM) = ksyn_BM * STIM - (kdeg_BM * BM)\n        C_ng_ml = Cc * MW\n        C_ng_ml ~ add(add_err_PK) + prop(prop_err_PK)\n        BM_obs = BM\n        BM_obs ~ add(add_err_BM)\n    })\n}"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$MDLMETA
#> [1] "base model"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$code
#> [1] "MB_obj_2_fcn = function () \n{\n    ini({\n        TV_F1 <- fix(2.22044604925031e-16, 0.744, Inf)\n        TV_ka <- c(2.22044604925031e-16, 0.282, Inf)\n        TV_CL <- c(-36.0436533891172, -1.6094379124341, 709.782712893384)\n        TV_Vc <- c(-36.0436533891172, 1.28370777234479, 709.782712893384)\n        TV_Vp <- c(-36.0436533891172, 1.01160091167848, 709.782712893384)\n        TV_Q <- c(-36.0436533891172, -0.29169009384932, 709.782712893384)\n        TV_MW <- fix(2.22044604925031e-16, 140, Inf)\n        TV_BM_IC <- c(2.22044604925031e-16, 1000, Inf)\n        TV_kdeg_BM <- fix(2.22044604925031e-16, 0.1, Inf)\n        TV_Emax <- c(2.22044604925031e-16, 100, Inf)\n        TV_EC50 <- fix(2.22044604925031e-16, 300, Inf)\n        prop_err_PK <- c(2.22044604925031e-16, 0.1, Inf)\n        add_err_PK <- c(2.22044604925031e-16, 0.1, Inf)\n        add_err_BM <- c(2.22044604925031e-16, 0.1, Inf)\n        ETAka ~ 0.416\n        ETACL ~ 0.09875\n        ETAVc ~ c(0.0786, 0.116)\n        ETAVp ~ c(0.0619, 0.0377, 0.0789)\n        ETAQ ~ 0.699\n        ETABM_IC ~ 0.05\n        ETAEmax ~ 0.1\n    })\n    model({\n        F1 = TV_F1\n        ka = TV_ka * exp(ETAka)\n        CL = exp(TV_CL) * exp(ETACL)\n        Vc = exp(TV_Vc) * exp(ETAVc)\n        Cc = Ac/(Vc)\n        Vp = exp(TV_Vp) * exp(ETAVp)\n        Q = exp(TV_Q) * exp(ETAQ)\n        MW = TV_MW\n        BM_IC = TV_BM_IC * exp(ETABM_IC)\n        kdeg_BM = TV_kdeg_BM\n        Emax = TV_Emax * exp(ETAEmax)\n        EC50 = TV_EC50\n        Dinf = 0\n        WTTV = 70\n        CL_IND = CL * (1 + SEX_ID * 0.1) * (1 + SUBTYPE_ID * \n            0.1)\n        kel = CL_IND/Vc * ((WT/WTTV))^(-0.35)\n        kcp = Q/Vc * ((WT/WTTV))^(-0.35)\n        kpc = Q/Vp * ((WT/WTTV))^(-0.35)\n        ksyn_BM = kdeg_BM * BM_IC\n        STIM = 1 + Emax * Cc/(EC50 + Cc)\n        BM(0) = BM_IC\n        d/dt(At) = (-ka * At)\n        d/dt(Ac) = ((ka * At * F1/Vc - kel * Cc - kcp * Cc + \n            kpc * Cp * Vp/Vc + Dinf/Vc)) * Vc\n        d/dt(Cp) = (kcp * Cc * Vc/Vp - kpc * Cp)\n        d/dt(BM) = ksyn_BM * STIM - (kdeg_BM * BM)\n        C_ng_ml = Cc * MW\n        C_ng_ml ~ add(add_err_PK) + prop(prop_err_PK)\n        BM_obs = BM\n        BM_obs ~ add(add_err_BM)\n    })\n}\n\nMB_obj_2_rx =  rxode2::rxode2(MB_obj_2_fcn)\n\nMB_obj_2_ts = list(\n  system  = \"weeks\",\n  details = \n    list(months = list(verb = \"Months\", conv = 4.13359788359788e-07), \n        weeks = list(verb = \"Weeks\", conv = 1.65343915343915e-06), \n        days = list(verb = \"Days\", conv = 1.15740740740741e-05), \n        hours = list(verb = \"Hours\", conv = 0.000277777777777778))\n)"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$checksum
#> [1] "defa767de59af224ca683c7c6cf2983a"
#> 
#> $CTS$MDL$mdl$MB_obj_2_rx$MDLchecksum
#> [1] "285c2f14ea0a75939504345a76fa647f"
#> 
#> 
#> 
#> 
#> $CTS$ui_ele
#>  [1] "element_name"            "nsub"                   
#>  [3] "fpage"                   "dvcols"                 
#>  [5] "time_scale"              "tc_dim"                 
#>  [7] "evplot"                  "visit_times"            
#>  [9] "trial_end"               "rule_condition"         
#> [11] "action_dosing_state"     "action_dosing_values"   
#> [13] "action_dosing_times"     "action_dosing_durations"
#> [15] "action_set_state_state"  "action_set_state_value" 
#> [17] "action_manual_code"      "cts_config_atol"        
#> [19] "cts_config_rtol"         "cts_config_sigdig"      
#> [21] "cts_config_seed"         "cts_config_nsteps"      
#> [23] "cts_config_preamble"    
#> 
#> $CTS$element_cntr
#> [1] 1
#> 
#> $CTS$sc_meta
#> $CTS$sc_meta$config
#> $CTS$sc_meta$config$atol
#> $CTS$sc_meta$config$atol$group
#> [1] "ODE Solver"
#> 
#> $CTS$sc_meta$config$atol$label
#> [1] "Absolute tolerance"
#> 
#> $CTS$sc_meta$config$atol$tooltip
#> [1] "Absolute tolerance used by the ODE solver to determine if a good solution has been achieved; This is also used in the solved linear model to check if prior doses do not add anything to the solution."
#> 
#> $CTS$sc_meta$config$atol$uitype
#> [1] "text"
#> 
#> $CTS$sc_meta$config$atol$type
#> [1] "numeric"
#> 
#> $CTS$sc_meta$config$atol$value
#> [1] "1e-8"
#> 
#> $CTS$sc_meta$config$atol$options
#> NULL
#> 
#> $CTS$sc_meta$config$atol$use
#> [1] "rxSolve"
#> 
#> $CTS$sc_meta$config$atol$placeholder
#> [1] "1e-8"
#> 
#> $CTS$sc_meta$config$atol$ui
#> [1] "cts_config_atol"
#> 
#> 
#> $CTS$sc_meta$config$rtol
#> $CTS$sc_meta$config$rtol$group
#> [1] "ODE Solver"
#> 
#> $CTS$sc_meta$config$rtol$label
#> [1] "Relative tolerance"
#> 
#> $CTS$sc_meta$config$rtol$tooltip
#> [1] "Relative tolerance used by the ODE solver to determine if a good solution has been achieved. This is also used in the solved linear model to check if prior doses do not add anything to the solution."
#> 
#> $CTS$sc_meta$config$rtol$uitype
#> [1] "text"
#> 
#> $CTS$sc_meta$config$rtol$type
#> [1] "numeric"
#> 
#> $CTS$sc_meta$config$rtol$value
#> [1] "1e-6"
#> 
#> $CTS$sc_meta$config$rtol$options
#> NULL
#> 
#> $CTS$sc_meta$config$rtol$use
#> [1] "rxSolve"
#> 
#> $CTS$sc_meta$config$rtol$placeholder
#> [1] "1e-6"
#> 
#> $CTS$sc_meta$config$rtol$ui
#> [1] "cts_config_rtol"
#> 
#> 
#> $CTS$sc_meta$config$sigdig
#> $CTS$sc_meta$config$sigdig$group
#> [1] "ODE Solver"
#> 
#> $CTS$sc_meta$config$sigdig$label
#> [1] "Significant digits"
#> 
#> $CTS$sc_meta$config$sigdig$tooltip
#> [1] "Specifies the \"significant digits\" that the ode solving requests. When specified this controls the relative and absolute tolerances of the ODE solvers. By default the tolerance is 0.5*10^(-sigdig-2) for regular ODEs. For the sensitivity equations the default is ⁠0.5*10\\^(-sigdig-1.5)⁠ (sensitivity changes only applicable for liblsoda). This also controls the atol/rtol of the steady state solutions. The ssAtol/ssRtol is ⁠0.5*10\\^(-sigdig)⁠ and for the sensitivities ⁠0.5*10\\^(-sigdig+0.625)⁠. By default this is unspecified (NULL) and uses the standard atol/rtol."
#> 
#> $CTS$sc_meta$config$sigdig$uitype
#> [1] "text"
#> 
#> $CTS$sc_meta$config$sigdig$type
#> [1] "numeric"
#> 
#> $CTS$sc_meta$config$sigdig$value
#> [1] "NULL"
#> 
#> $CTS$sc_meta$config$sigdig$options
#> NULL
#> 
#> $CTS$sc_meta$config$sigdig$use
#> [1] "rxSolve"
#> 
#> $CTS$sc_meta$config$sigdig$placeholder
#> [1] "NULL"
#> 
#> $CTS$sc_meta$config$sigdig$ui
#> [1] "cts_config_sigdig"
#> 
#> 
#> $CTS$sc_meta$config$seed
#> $CTS$sc_meta$config$seed$group
#> [1] "Misc"
#> 
#> $CTS$sc_meta$config$seed$label
#> [1] "Random Seed"
#> 
#> $CTS$sc_meta$config$seed$tooltip
#> [1] "Integer value to set the seed for the random number generator"
#> 
#> $CTS$sc_meta$config$seed$uitype
#> [1] "text"
#> 
#> $CTS$sc_meta$config$seed$type
#> [1] "numeric"
#> 
#> $CTS$sc_meta$config$seed$value
#> [1] "5446"
#> 
#> $CTS$sc_meta$config$seed$options
#> NULL
#> 
#> $CTS$sc_meta$config$seed$use
#> [1] "Misc"
#> 
#> $CTS$sc_meta$config$seed$placeholder
#> [1] "5446"
#> 
#> $CTS$sc_meta$config$seed$ui
#> [1] "cts_config_seed"
#> 
#> 
#> $CTS$sc_meta$config$nsteps
#> $CTS$sc_meta$config$nsteps$group
#> [1] "Misc"
#> 
#> $CTS$sc_meta$config$nsteps$label
#> [1] "Time Steps"
#> 
#> $CTS$sc_meta$config$nsteps$tooltip
#> [1] "Integer value representing the number of time steps to add between zero and the end of trial. A larger value will give smoother curves but it will also take more time to simulate."
#> 
#> $CTS$sc_meta$config$nsteps$uitype
#> [1] "text"
#> 
#> $CTS$sc_meta$config$nsteps$type
#> [1] "numeric"
#> 
#> $CTS$sc_meta$config$nsteps$value
#> [1] "200"
#> 
#> $CTS$sc_meta$config$nsteps$options
#> NULL
#> 
#> $CTS$sc_meta$config$nsteps$use
#> [1] "Misc"
#> 
#> $CTS$sc_meta$config$nsteps$placeholder
#> [1] "200"
#> 
#> $CTS$sc_meta$config$nsteps$ui
#> [1] "cts_config_nsteps"
#> 
#> 
#> $CTS$sc_meta$config$preamble
#> $CTS$sc_meta$config$preamble$group
#> [1] "Rule Environment Preamble"
#> 
#> $CTS$sc_meta$config$preamble$label
#> NULL
#> 
#> $CTS$sc_meta$config$preamble$tooltip
#> [1] "Optional user-defined code to be executed in the rule-evaluation environment. You can create user-defined functions here."
#> 
#> $CTS$sc_meta$config$preamble$uitype
#> [1] "textarea"
#> 
#> $CTS$sc_meta$config$preamble$type
#> [1] "character"
#> 
#> $CTS$sc_meta$config$preamble$value
#> NULL
#> 
#> $CTS$sc_meta$config$preamble$options
#> NULL
#> 
#> $CTS$sc_meta$config$preamble$use
#> [1] "rules"
#> 
#> $CTS$sc_meta$config$preamble$placeholder
#> [1] "my_func = function(id=NULL){\n\n}"
#> 
#> $CTS$sc_meta$config$preamble$ui
#> [1] "cts_config_preamble"
#> 
#> 
#> 
#> $CTS$sc_meta$cfg_summary
#>       name                  ui     use      type                     group
#> 1     atol     cts_config_atol rxSolve   numeric                ODE Solver
#> 2     rtol     cts_config_rtol rxSolve   numeric                ODE Solver
#> 3   sigdig   cts_config_sigdig rxSolve   numeric                ODE Solver
#> 4     seed     cts_config_seed    Misc   numeric                      Misc
#> 5   nsteps   cts_config_nsteps    Misc   numeric                      Misc
#> 6 preamble cts_config_preamble   rules character Rule Environment Preamble
#> 
#> $CTS$sc_meta$ui_config
#> [1] "cts_config_atol"     "cts_config_rtol"     "cts_config_sigdig"  
#> [4] "cts_config_seed"     "cts_config_nsteps"   "cts_config_preamble"
#> 
#> 
#> $CTS$ui
#> $CTS$ui$source_model
#> [1] "MB_obj_1_rx"
#> 
#> 
#> $CTS$current_element
#> [1] "element_1"
#> 
#> $CTS$elements
#> $CTS$elements$element_1
#> $CTS$elements$element_1$isgood
#> [1] TRUE
#> 
#> $CTS$elements$element_1$ui
#> $CTS$elements$element_1$ui$element_name
#> [1] "cohort 1"
#> 
#> $CTS$elements$element_1$ui$nsub
#> [1] 10
#> 
#> $CTS$elements$element_1$ui$visit_times
#> [1] 0
#> 
#> $CTS$elements$element_1$ui$trial_end
#> [1] 100
#> 
#> $CTS$elements$element_1$ui$fpage
#> [1] "1"
#> 
#> $CTS$elements$element_1$ui$dvcols
#> [1] "Cc"
#> 
#> $CTS$elements$element_1$ui$time_scale
#> [1] ""
#> 
#> $CTS$elements$element_1$ui$tc_dim
#> [1] "d2x4"
#> 
#> $CTS$elements$element_1$ui$evplot
#> [1] 1
#> 
#> $CTS$elements$element_1$ui$source_model
#> [1] "MB_obj_1_rx"
#> 
#> $CTS$elements$element_1$ui$cts_config_atol
#> [1] "1e-8"
#> 
#> $CTS$elements$element_1$ui$cts_config_rtol
#> [1] "1e-6"
#> 
#> $CTS$elements$element_1$ui$cts_config_sigdig
#> [1] "NULL"
#> 
#> $CTS$elements$element_1$ui$cts_config_seed
#> [1] "5446"
#> 
#> $CTS$elements$element_1$ui$cts_config_nsteps
#> [1] "200"
#> 
#> 
#> $CTS$elements$element_1$id
#> [1] "element_1"
#> 
#> $CTS$elements$element_1$idx
#> [1] 1
#> 
#> $CTS$elements$element_1$element_object_name
#> [1] "CTS_obj_1"
#> 
#> $CTS$elements$element_1$cov_object_name
#> [1] "CTS_obj_1_cov"
#> 
#> $CTS$elements$element_1$rules_object_name
#> [1] "CTS_obj_1_rules"
#> 
#> $CTS$elements$element_1$subs_object_name
#> [1] "CTS_obj_1_subs"
#> 
#> $CTS$elements$element_1$rxopts_object_name
#> [1] "CTS_obj_1_rxopts"
#> 
#> $CTS$elements$element_1$rx_details_object_name
#> [1] "CTS_obj_1_rx_details"
#> 
#> $CTS$elements$element_1$simres_object_name
#> [1] "CTS_obj_1_simres"
#> 
#> $CTS$elements$element_1$sim_tc_object_name
#> [1] "CTS_obj_1_sim_tc"
#> 
#> $CTS$elements$element_1$sim_ev_object_name
#> [1] "CTS_obj_1_sim_ev"
#> 
#> $CTS$elements$element_1$ot_object_name
#> [1] "CTS_obj_1_output_times"
#> 
#> $CTS$elements$element_1$fgtc_object_name
#> [1] "CTS_obj_1_fgtc"
#> 
#> $CTS$elements$element_1$fgev_object_name
#> [1] "CTS_obj_1_fgev"
#> 
#> $CTS$elements$element_1$code_previous
#> [1] ""
#> 
#> $CTS$elements$element_1$dvcols_selection
#> list()
#> 
#> $CTS$elements$element_1$rx_details
#> $CTS$elements$element_1$rx_details$isgood
#> [1] TRUE
#> 
#> $CTS$elements$element_1$rx_details$msgs
#> NULL
#> 
#> $CTS$elements$element_1$rx_details$elements
#> $CTS$elements$element_1$rx_details$elements$dosing
#> character(0)
#> 
#> $CTS$elements$element_1$rx_details$elements$sys_units
#> character(0)
#> 
#> $CTS$elements$element_1$rx_details$elements$covariates
#> character(0)
#> 
#> $CTS$elements$element_1$rx_details$elements$population
#> [1] "lka" "lcl" "lvc"
#> 
#> $CTS$elements$element_1$rx_details$elements$parameters
#> [1] "ka" "cl" "vc"
#> 
#> $CTS$elements$element_1$rx_details$elements$secondary
#> [1] "kel"
#> 
#> $CTS$elements$element_1$rx_details$elements$residual_error
#> [1] "propSd"
#> 
#> $CTS$elements$element_1$rx_details$elements$iiv
#> [1] "etalcl" "etalvc"
#> 
#> $CTS$elements$element_1$rx_details$elements$outputs
#> [1] "Cc"
#> 
#> $CTS$elements$element_1$rx_details$elements$states
#> [1] "depot"   "central"
#> 
#> 
#> $CTS$elements$element_1$rx_details$txt_info
#> [1] "Outputs\nCc\n\nStates/Compartments\ndepot, central\n\nCovariates\nNone found\n\nPopulation Parameters\nlka, lcl, lvc\n\nIndividual Parameters\nka, cl, vc\n\nSecondary Parameters\nkel\n\nBetween-Subject Variability\netalcl, etalvc\n\nResidual Error Parameters\npropSd\n\n"
#> 
#> $CTS$elements$element_1$rx_details$list_info
#>  [1] "1"                                          
#>  [2] "Outputs: Cc"                                
#>  [3] "1"                                          
#>  [4] "States: depot, central"                     
#>  [5] "1"                                          
#>  [6] "Covariates: None Found"                     
#>  [7] "1"                                          
#>  [8] "Population Parameters: lka, lcl, lvc"       
#>  [9] "1"                                          
#> [10] "Individual Parameters: ka, cl, vc"          
#> [11] "1"                                          
#> [12] "Secondary Parameters: kel"                  
#> [13] "1"                                          
#> [14] "Between-Subject Variability: etalcl, etalvc"
#> [15] "1"                                          
#> [16] "Residual Error Parameters: propSd"          
#> 
#> $CTS$elements$element_1$rx_details$ht_info
#> <b>Outputs</b>
#> <br/>
#> Cc
#> <br/>
#> <br/>
#> <b>States/Compartments</b>
#> <br/>
#> depot, central
#> <br/>
#> <br/>
#> <b>Covariates</b>
#> <br/>
#> <em>None found</em>
#> <br/>
#> <br/>
#> <b>Population Parameters</b>
#> <br/>
#> lka, lcl, lvc
#> <br/>
#> <br/>
#> <b>Individual Parameters</b>
#> <br/>
#> ka, cl, vc
#> <br/>
#> <br/>
#> <b>Secondary Parameters</b>
#> <br/>
#> kel
#> <br/>
#> <br/>
#> <b>Between-Subject Variability</b>
#> <br/>
#> etalcl, etalvc
#> <br/>
#> <br/>
#> <b>Residual Error Parameters</b>
#> <br/>
#> propSd
#> <br/>
#> <br/>
#> 
#> 
#> $CTS$elements$element_1$model_label
#> [1] "One compartment model"
#> 
#> $CTS$elements$element_1$MDLchecksum
#> [1] "dabcf0060488da635fd86bd7199eeaac"
#> 
#> $CTS$elements$element_1$SIMchecksum
#> [1] "NOTRUN"
#> 
#> $CTS$elements$element_1$components_table
#> NULL
#> 
#> $CTS$elements$element_1$components_list
#> list()
#> 
#> $CTS$elements$element_1$covariates
#> list()
#> 
#> $CTS$elements$element_1$covariates_ui_type
#> list()
#> 
#> $CTS$elements$element_1$checksum
#> [1] "7662291cfda678368edef72abe61a255"
#> 
#> $CTS$elements$element_1$code
#> [1] "library(rxode2)\nlibrary(nonmem2rx)\nlibrary(nlmixr2lib)\n\n# Creating the model\nMB_obj_1_fcn = function () \n{\n    description <- \"One compartment PK model with linear clearance using differential equations\"\n    ini({\n        lka <- 0.45\n        label(\"Absorption rate (Ka)\")\n        lcl <- 1\n        label(\"Clearance (CL)\")\n        lvc <- 3.45\n        label(\"Central volume of distribution (V)\")\n        propSd <- c(0, 0.5)\n        label(\"Proportional residual error (fraction)\")\n        etalcl ~ 0.1\n        etalvc ~ 0.01\n    })\n    model({\n        ka <- exp(lka)\n        cl <- exp(lcl + etalcl)\n        vc <- exp(lvc + etalvc)\n        kel <- cl/vc\n        d/dt(depot) <- -ka * depot\n        d/dt(central) <- ka * depot - kel * central\n        Cc <- central/vc\n        Cc ~ prop(propSd)\n    })\n}\n\nMB_obj_1_rx =  rxode2::rxode2(MB_obj_1_fcn)\n\nMB_obj_1_ts = list(\n  system  = \"weeks\",\n  details = \n    list(months = list(verb = \"Months\", conv = 4.13359788359788e-07), \n        weeks = list(verb = \"Weeks\", conv = 1.65343915343915e-06), \n        days = list(verb = \"Days\", conv = 1.15740740740741e-05), \n        hours = list(verb = \"Hours\", conv = 0.000277777777777778))\n)\n# Setting the random seeds\nset.seed(5446)\nrxode2::rxSetSeed(5446)\n\n\n# Fetching the system information\nCTS_obj_1_rx_details = fetch_rxinfo(MB_obj_1_rx)\n\n# Defining covariates\nCTS_obj_1_cov = list()\n\n# Generating the subjects\nCTS_obj_1_subs = mk_subjects(object = MB_obj_1_rx,\n  nsub   = 10,\n  covs   = CTS_obj_1_cov)\n\n# Creating rules\nCTS_obj_1_rules = list()\n\n# rxSolve options\nCTS_obj_1_rxopts = list(\n  atol = 1e-8,\n  rtol = 1e-6,\n  sigdig = NULL)\n\n# Output times\nCTS_obj_1_output_times = formods::linspace(0,100,200)\n\n# Running simulation\nCTS_obj_1_simres =                                 \n simulate_rules(object            = MB_obj_1_rx,\n                subjects          = CTS_obj_1_subs[[\"subjects\"]],\n                eval_times        = c(0),\n                output_times      = CTS_obj_1_output_times,\n                time_scales       = MB_obj_1_ts,\n                rules             = CTS_obj_1_rules,\n                rx_options        = CTS_obj_1_rxopts)\n\n# Collecting the simulation and event history values\nCTS_obj_1_sim_tc = CTS_obj_1_simres[[\"simall\"]]\nCTS_obj_1_sim_ev = CTS_obj_1_simres[[\"ev_history\"]]\n\n# Plotting timecourse\nCTS_obj_1_fgtc =                                 \n  plot_sr_tc(sro = CTS_obj_1_simres,\n    xcol         = \"time\",         \n    xlab_str     = \"Time\",         \n    fncol        = 4,                       \n    fnrow        = 2,                       \n    dvcols       = \"Cc\",\n    fpage        = 1)\n\n# Plotting events\nCTS_obj_1_fgev =                                 \n  plot_sr_ev(sro = CTS_obj_1_simres,\n    xcol         = \"time\",         \n    xlab_str     = \"Time\",         \n    fncol        = 4,                       \n    fnrow        = 2,                       \n    evplot       = 1,\n    fpage        = 1)\n"
#> 
#> $CTS$elements$element_1$code_ele_only
#> [1] "\n# Fetching the system information\nCTS_obj_1_rx_details = fetch_rxinfo(MB_obj_1_rx)\n\n# Defining covariates\nCTS_obj_1_cov = list()\n\n# Generating the subjects\nCTS_obj_1_subs = mk_subjects(object = MB_obj_1_rx,\n  nsub   = 10,\n  covs   = CTS_obj_1_cov)\n\n# Creating rules\nCTS_obj_1_rules = list()\n\n# rxSolve options\nCTS_obj_1_rxopts = list(\n  atol = 1e-8,\n  rtol = 1e-6,\n  sigdig = NULL)\n\n# Output times\nCTS_obj_1_output_times = formods::linspace(0,100,200)\n\n# Running simulation\nCTS_obj_1_simres =                                 \n simulate_rules(object            = MB_obj_1_rx,\n                subjects          = CTS_obj_1_subs[[\"subjects\"]],\n                eval_times        = c(0),\n                output_times      = CTS_obj_1_output_times,\n                time_scales       = MB_obj_1_ts,\n                rules             = CTS_obj_1_rules,\n                rx_options        = CTS_obj_1_rxopts)\n\n# Collecting the simulation and event history values\nCTS_obj_1_sim_tc = CTS_obj_1_simres[[\"simall\"]]\nCTS_obj_1_sim_ev = CTS_obj_1_simres[[\"ev_history\"]]\n"
#> 
#> $CTS$elements$element_1$code_figtcev
#> [1] "# Plotting timecourse\nCTS_obj_1_fgtc =                                 \n  plot_sr_tc(sro = CTS_obj_1_simres,\n    xcol         = \"time\",         \n    xlab_str     = \"Time\",         \n    fncol        = 4,                       \n    fnrow        = 2,                       \n    dvcols       = \"Cc\",\n    fpage        = 1)\n\n# Plotting events\nCTS_obj_1_fgev =                                 \n  plot_sr_ev(sro = CTS_obj_1_simres,\n    xcol         = \"time\",         \n    xlab_str     = \"Time\",         \n    fncol        = 4,                       \n    fnrow        = 2,                       \n    evplot       = 1,\n    fpage        = 1)\n"
#> 
#> $CTS$elements$element_1$code_figtc_rpt
#>  [1] "# Plotting timecourse"                        
#>  [2] "CTS_obj_1_fgtc =                             "
#>  [3] "  plot_sr_tc(sro = CTS_obj_1_simres,"         
#>  [4] "    xcol         = \"time\",         "        
#>  [5] "    xlab_str     = \"Time\",         "        
#>  [6] "    fncol        = 4,                       " 
#>  [7] "    fnrow        = 2,                       " 
#>  [8] "    dvcols       = \"Cc\","                   
#>  [9] "    fpage        = fg_page)"                  
#> [10] ""                                             
#> 
#> $CTS$elements$element_1$code_figev_rpt
#>  [1] "# Plotting events"                                
#>  [2] "CTS_obj_1_fgev =                                 "
#>  [3] "  plot_sr_ev(sro = CTS_obj_1_simres,"             
#>  [4] "    xcol         = \"time\",         "            
#>  [5] "    xlab_str     = \"Time\",         "            
#>  [6] "    fncol        = 4,                       "     
#>  [7] "    fnrow        = 2,                       "     
#>  [8] "    evplot       = 1,"                            
#>  [9] "    fpage        = fg_page)"                      
#> [10] ""                                                 
#> 
#> $CTS$elements$element_1$code_sim_only
#> [1] "# Setting the random seeds\nset.seed(5446)\nrxode2::rxSetSeed(5446)\n\n\n# Fetching the system information\nCTS_obj_1_rx_details = fetch_rxinfo(MB_obj_1_rx)\n\n# Defining covariates\nCTS_obj_1_cov = list()\n\n# Generating the subjects\nCTS_obj_1_subs = mk_subjects(object = MB_obj_1_rx,\n  nsub   = 10,\n  covs   = CTS_obj_1_cov)\n\n# Creating rules\nCTS_obj_1_rules = list()\n\n# rxSolve options\nCTS_obj_1_rxopts = list(\n  atol = 1e-8,\n  rtol = 1e-6,\n  sigdig = NULL)\n\n# Output times\nCTS_obj_1_output_times = formods::linspace(0,100,200)\n\n# Running simulation\nCTS_obj_1_simres =                                 \n simulate_rules(object            = MB_obj_1_rx,\n                subjects          = CTS_obj_1_subs[[\"subjects\"]],\n                eval_times        = c(0),\n                output_times      = CTS_obj_1_output_times,\n                time_scales       = MB_obj_1_ts,\n                rules             = CTS_obj_1_rules,\n                rx_options        = CTS_obj_1_rxopts)\n\n# Collecting the simulation and event history values\nCTS_obj_1_sim_tc = CTS_obj_1_simres[[\"simall\"]]\nCTS_obj_1_sim_ev = CTS_obj_1_simres[[\"ev_history\"]]\n"
#> 
#> 
#> 
#> $CTS$checksum
#> [1] "351269c95d7155b66deffb91bd3f52fc"
#> 
#> 
#> $MOD_TYPE
#> [1] "CTS"
#> 
#> $id
#> [1] "CTS"
#> 
#> $dep_mod_ids
#> [1] "MB"
#> 
#> $FM_yaml_file
#> [1] "/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/formods/templates/formods.yaml"
#> 
#> $MOD_yaml_file
#> [1] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpsHsa6m/temp_libpathea835f893037/ruminate/templates/CTS.yaml"
#> 
#> $shiny_token
#> [1] "non_shiny"
#>