Learn R Programming

NMsim (version 0.2.8)

prioritizePaths: first path that works

Description

When using scripts on different systems, the Nonmem path may change from run to run. With this function you can specify a few paths, and it will return the one that works on the system in use.

Usage

prioritizePaths(paths, must.work = FALSE)

Value

A single path (character string)

Arguments

paths

vector of file paths. Typically to Nonmem executables.

must.work

If TRUE, an error is thrown if no paths are valid.

Examples

Run this code
library(NMdata)
NMdataConf(path.nonmem = prioritizePaths(c(
  "/opt/NONMEM/nm75/run/nmfe75",
  "C:/nm75g64/run/nmfe75.bat")
))

Run the code above in your browser using DataLab