Access model code from an xpdb object.

get_code(xpdb, .problem = NULL)

Arguments

xpdb

An xpose_data object from which the model code will be extracted.

.problem

The problem to be used, in addition, problem 0 is attributed to general output (e.g. NM-TRAN warnings in NONMEM). By default returns the entire code.

Value

A tibble of the parsed model.

See also

Examples

parsed_model <- get_code(xpdb_ex_pk) parsed_model
#> # A tibble: 764 x 5 #> problem level subroutine code comment #> * <int> <int> <chr> <chr> <chr> #> 1 0 0 oth "Mon Oct 16 13:34:28 CEST 2017" "" #> 2 0 0 oth "" "; 1. Based on: 00… #> 3 0 0 oth "" "; 2. Description:… #> 4 0 0 oth "" "; NONMEM PK examp… #> 5 1 1 pro "Parameter estimation" "" #> 6 1 2 inp "ID DOSE DV SCR AGE SEX CLASS W… "" #> 7 1 2 inp " CLCR AMT SS II EVID" "" #> 8 1 3 dat "../../mx19_2.csv IGNORE=@" "" #> 9 1 4 abb "DERIV2=NO" "" #> 10 1 5 sub "ADVAN2 TRANS1" "" #> # … with 754 more rows