PM_data R6 objects containing raw, standardized and valid data, and methods to process the data
Details
PM_data objects are passed to PM_fit objects to initiate a
population analysis. The object is created by reading a delimited file in
the current working directory. The data will be transformed into the standard
format which is the same for all engines, with a report of any assumptions
that were necessary to standardize the data. PMcheck is called
on the standard data to evaluate for errors. If dates and times are converted
to relative decimal times in the standard data, automatic detection of the correct
format will be attempted using lubridate::parse_date_time()
. In the case of failure
due to an unusual format, use the 'dt' argument to specify the correct format in your
data. In the case of successful automatic detection, the format used will be
included in the standardization report generated upon creation of a new PM_data
object. Check carefully to make sure the correct format was chosen. Note that if
your clock times did not include seconds, they were appended as ":00" to the end
of each time and will appear that way in the copy of the original data.
There are a number of methods defined for a PM_data object, including to write the standard data back to a file for future use, to summarize and to plot the object, and to conduct a non-compartmental analysis on the raw data using makeNCA.
Public fields
data
Data frame containing the data to be modeled
standard_data
Data frame containing standardized version of the data
Methods
Method new()
Create new data object
Usage
PM_data$new(data, dt = NULL, quiet = F)
Arguments
data
A quoted name of a file with full path if not in the working directory, or an unquoted name of a data frame in the current R environment.
dt
Pmetrics will try a variety of date/time formats. If all 16 of them fail, use this parameter to specify the correct format as a character vector whose first element is date format and second is time. Use the following abbreviations:
Y = 4 digit year
y = 2 digit year
m = decimal month (1, 2, ..., 12)
d = decimal day (1, 2, ..., 31)
H = hours (0-23)
M = minutes (0-59) Example:
format = c("myd", "mh")
. Not one of the tried combinations! Always check to make sure that dates/times were parsed correctly and the relative times in thePM_data$standard_data
field look correct. Other date/time formats are possible. Seelubridate::parse_date_time()
for these.
quiet
Quietly validate. Default is
FALSE
....
Arguments to be passed further
Method write()
Write data to file
Method nca()
Perform non-compartmental analysis
Arguments
...
Arguments passed to makeNCA.
Details
See makeNCA.
Method print()
Print method
Arguments
standard
Display the standardized data if
TRUE
. Default isFALSE
.viewer
Display the Viewer if
TRUE
. Default isTRUE
....
Other arguments to print.data.frame. Only passed if
viewer = FALSE
.
Method summary()
Summary method
Arguments
...
Arguments passed to summary.PMmatrix.
Details
See summary.PMmatrix.