sparse | R Documentation |
sparse()
detects differentiates between clusters of consecutive samples
and more spread out, or "sparse," samples in a NONMEM-formatted data set.
sparse(data, min_cluster = 3, max_distance = 26, plot = FALSE)
data |
A data frame or data frame extension in NONMEM format. |
min_cluster |
The minimum size of a cluster of consecutive observations to be considered intensive (i.e. not sparse) sampling. |
max_distance |
The maximum allowed distance between the earliest and latest observation of a single cluster. |
plot |
Logical. Whether to make a plot of individual PK curves with sparse observations labeled. |
For each ID, sparse()
iterates through each line of the data set until
it finds an observation. It then checks for "neighbors," meaning consecutive observations without
a dose record in between. Any group of min_cluster
or more observations within at most max_distance
from
one another is considered a cluster.
A tibble::tibble()
with an appended column, SPARSE, containing a 1
for all observation points not contained in a cluster, and a 0 otherwise.
Sandy Floren
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.