Prints the contents of a named section of a .ferx model file to the console and returns the input object invisibly so the pipe can continue.

ferx_get_section(x, section)

Arguments

x

A ferx_model object or a path to a .ferx file.

section

Name of the section to display, without brackets.

Value

x, invisibly.

Details

When x is a ferx_model object the section is read from x$model. When x is a plain path string the call is equivalent to ferx_model_section(x, section).

Examples

ex <- ferx_example("warfarin")

# Inspect [parameters] and continue piping — ferx_get_section() prints
# the section and passes the ferx_model object through unchanged.
ferx_model(ex$data, ex$model) |>
  ferx_get_section("parameters")
#> # [parameters]
#>   theta TVCL(0.134, 0.001, 10.0)
#>   theta TVV(8.1, 0.1, 500.0)
#>   theta TVKA(1.0, 0.01, 50.0)
#> 
#>   omega ETA_CL ~ 0.07
#>   omega ETA_V  ~ 0.02
#>   omega ETA_KA ~ 0.40
#> 
#>   sigma PROP_ERR ~ 0.01
#> 
#> 

if (FALSE) { # \dontrun{
# Mid-pipe peek: print [parameters] then fit without interrupting the chain
fit <- ferx_model(ex$data, ex$model) |>
  ferx_get_section("parameters") |>
  ferx_fit(method = "focei")
} # }