read_ctl() parses records from a file, and parse_ctl() parses them from a character vector.

read_ctl(path)

parse_ctl(lines)

Arguments

path

Path to NONMEM control stream.

lines

Lines from a NONMEM control stream.

Value

An nmrec_ctl_records object.

See also

write_ctl() for writing records to a file.

Examples

lines <- nmrec_examples[["bayes1"]]
head(lines)
#> [1] ";Model Desc: Two compartment Model, Using ADVAN3, TRANS4"        
#> [2] ";Project Name: nm7examples"                                      
#> [3] ""                                                                
#> [4] "$PROB RUN# Example 1 (from samp5l)"                              
#> [5] "$INPUT C SET ID JID TIME  DV=CONC AMT=DOSE RATE EVID MDV CMT CLX"
#> [6] "       V1X QX V2X SDIX SDSX"                                     
ctl <- parse_ctl(lines)
names(ctl)
#> [1] "frontmatter" "records"    
head(ctl$records, n = 2)
#> [[1]]
#> $PROB RUN# Example 1 (from samp5l)
#> 
#> 
#> [[2]]
#> $INPUT C SET ID JID TIME  DV=CONC AMT=DOSE RATE EVID MDV CMT CLX
#>        V1X QX V2X SDIX SDSX
#> 
#>