Skip to contents

Thank you for your interest in Pmetrics! This guide provides instructions and examples to assist users of the Pmetrics R package, by the Laboratory of Applied Pharmacokinetics and Bioinformatics at the Saban Research Institute, Children’s Hospital Los Angeles, and the Department of Pediatrics, Keck School of Medicine, University of Southern California. Please see our website at for more information.

R6 architecture

As of v. 2.0, Pmetrics shifted to an architecture less dependent on reading and writing files. Data files are unchanged and described later in this manual.

Model files can now be defined as an R object, instead of in a text file. Pmetrics can suppoort legacy runs with the old-style text file models, but users are encouraged to change to the new methods. Throughout this manual we will indicate the new style with the R6 designation to reflect the object-oriented R6 style of programming available in R that makes it more consistent with object-oriented languages such as Python. We will indicate old-style approaches with Legacy.

Functions and classes in R6 are generally named with “PM_” as the prefix, e.g. PM_load() or PM_final(). In Legacy, functions and classes are prefixed without the underscore “_“, such as PMload(), and PMfinal().

Tips for using this guide.

  • Items that are hyperlinked can be selected to cross reference within this manual or link to external sites.

  • Items correspond to inline examples of R code, which are not evaluated in this document, but serve as templates for what may be typed into your R console or script. They may not necessarily be executable if typed verbatim.


You, the user, assume all responsibility for acting on the results obtained from Pmetrics. The Laboratory of Applied Pharmacokinetics and Bioinformatics (LAPKB), members and consultants to LAPKB, and Children’s Hospital Los Angeles and the University of Southern California and their employees assume no liability whatsoever. Your use of the package constitutes your agreement to this provision.


Pmetrics and all required components will run under Mac (Unix), Windows, and Linux. Instructions on obtaining and installing the package are in vignette("pmetrics").

What This Manual Is Not

We assume that the user has familiarity with population modeling and R, and thus this manual is not a tutorial for basic concepts and techniques in either domain. We have tried to make the R code simple, regular and well documented. A very good free online resource for learning the basics of R can be found at Stat Methods.

We recognize that initial use of a new software package can be complex, so please feel free to contact us at any time, preferably through the Pmetrics Disussions. You can report issues online as well.

This manual is also not intended to be a theoretical treatise on the algorithms used in IT2B or NPAG. For that, the user is directed to our website.

Getting Help and Updates

Within R, you can use help("command") or more simply just ?command in the R console to see detailed help files for any Pmetrics command. Many commands have examples included in this documentation and you can execute the examples with example(command).

You can also type PMmanual() to launch this website from within Pmetrics.

Pmetrics will check for updates automatically every time you load it with library(Pmetrics) and you are connected to the internet. If an update is available, it will provide a brief message to inform you. You can then reinstall the package from github.

Customizing Options

You can change global options in Pmetrics with setPMoptions().

Currently you can change three options: sep and dec will allow Pmetrics to read data files whose field separators are semicolons and decimal separators are commas, e.g. setPMoptions(sep=";", dec=","). These options will persist from session to session until changed. The third option, server_address, allows you to specify the address of a remote server with Pmetrics installed, to allow remote runs.

getPMoptions() will return the current options.