Extract the Objective Function Value (OFV) from a NONMEM Listing File
Source:R/fetch_ofv.R
fetch_ofv.RdExtracts the OFV reported on the #OBJV: line of a NONMEM .lst file.
For failed or early-terminated runs where #OBJV: is absent, the function
falls back to the workflow footer (OFV = ...) and returns NA with a
warning if neither is found.
Arguments
- lst
An object of class
"lst"fromread_lst_file().- digits
Integer or
NA. Rounding for the OFV. DefaultNA.
Examples
path <- system.file("testdata", "full_cov.lst", package = "lstparsR")
lst <- read_lst_file(path)
fetch_ofv(lst)
#> [1] 8986.318