NMreplaceDataFile function

Replace data file used in Nonmem control stream

Replace data file used in Nonmem control stream

NMreplaceDataFile(files, file.pattern, dir, path.data, newfile = file.mod, ...)

Arguments

  • files: Paths to input control streams to modify. See file.pattern and dir too.
  • file.pattern: A pattern to look for if dir is supplied too (and not file.mod). This is used to modify multiple input control streams at once.
  • dir: Directory in which to look for file.pattern. Notice, use either just file.mod or both dir and file.pattern.
  • path.data: Path to input control stream to use in newfile
  • newfile: A path to a new control stream to write to (and don't edit contents of file.mod). Default is to overwrite file.mod.
  • ...: Additional arguments to pass to NMwriteSection.

Returns

Lines for a new control stream (invisibly)

See Also

Other Nonmem: NMapplyFilters(), NMextractText(), NMgenText(), NMreadSection(), NMwriteSection()

  • Maintainer: Philip Delff
  • License: MIT + file LICENSE
  • Last published: 2025-03-21