nm_diff: Compute diff between two NONMEM runs

View source: R/nm_diff.R

nm_diffR Documentation

Compute diff between two NONMEM runs

Description

[Stable]

The easiest way to use this function is via the "view diff" RStudio 'Addin'.

NMproject's control file manipulation functions (e.g. subroutine()) may not work for all control files. It is the responsibility of the user to check automatic manipulations are done properly. Displaying diffs provides a means of manually checking what was done.

Usage

nm_diff(m, ref_m, format = "raw")

Arguments

m

An nm object.

ref_m

An optional nm object (base/reference object). If not specified, it will compute the diff the initial control file contents associated with the object at the time of object create. This information is stored in the ctl_orig field.

format

Character (default = "raw") argument passed to diffobj::diffChr()

Value

Invisibly returns a character vector of the diff.

Examples


# create example object m1 from package demo files
exdir <- system.file("extdata", "examples", "theopp", package = "NMproject")
m1 <- new_nm(run_id = "m1", 
             based_on = file.path(exdir, "Models", "ADVAN2.mod"),
             data_path = file.path(exdir, "SourceData", "THEOPP.csv"))

m2 <- m1 %>% child(run_id = "m2") %>%
  subroutine(advan = 2, trans = 2)

nm_diff(m2, m1)


NMproject documentation built on Sept. 30, 2022, 1:06 a.m.