Read a Pmetrics .csv Matrix Input FileSource:
PMreadMatrix reads an NPAG .csv matrix input file into R.
The name of the file to be loaded, including the full path if not in the current working directory (check with
Skip n lines, with default set to 0.
Delimiter between columns, which is a comma by default, but can be changed with
Decimal separator, which is a period by default, but can be changed with
Format for any dates. Default is set as year month day, with flexible separator. See
parse_datein the readr package for more information on formatting dates. #' @param time_format Format for any clock times. Default is set as hours:minutes. See
parse_datein the readr package for more information on formatting times.
Default is false. If true, there will be no report to the console on the contents of file.
Other parameters to be passed to
PMreadMatrix returns a data.frame of class “PMmatrix” with one row per
event and the following columns.
The id value for each event.
The evid value for each event, with 0=observation, 1=dose, 4=dose reset, which resets the time to 0 and all compartment amounts to 0. Note that evid=2 and 3 are not currently implemented.
Relative time of the event in hours.
Duration of the dose. If dose is instantaneous, e.g. an oral dose into an absorptive compartment,
durshould be 0. Any values greater than 0 are interpreted to mean a constant infusion of that duration, equalling the
The dose. Be sure that the units are consistent with
Optional number of additional doses to add at an interval specified in ii. The default if missing is 0. A value of -1 will cause steady state conditions to be approximated. Any value for addl other than 0 or missing requires input in ii.
The interdose interval for addl doses or dosing at steady state.
The input number corresponding to
The measured output, equivalent to “DV” in some other PK modeling software tools.
The number of the output equation specified in the model file which corresponds to the
Assay error polynomial coefficient, e.g. SD = C0 + C1obs + C2obs^2 + C3*obs^3
Additional columns are interpreted to be covariates.
If the file is successfully read and
the column headers of the scanned file will be reported to the console as a validation check.
The structure of a valid .csv file is fairly rigid. See
for details. Note that
PMreadMatrix converts the column headers in the
matrixfile from upper to lowercase for convenient referencing in R.