Summarize PKNCA results

# S3 method for PKNCAresults
summary(
  object,
  ...,
  drop.group = object$data$conc$subject,
  summarize.n.per.group = TRUE,
  not.requested.string = ".",
  not.calculated.string = "NC"
)

Arguments

object

The results to summarize

...

Ignored.

drop.group

Which group(s) should be dropped from the formula?

summarize.n.per.group

Should a column for N be added (TRUE or FALSE)? Note that N is maximum number of parameter results for any parameter; if no parameters are requested for a group, then N will be NA.

not.requested.string

A character string to use when a parameter summary was not requested for a parameter within an interval.

not.calculated.string

A character string to use when a parameter summary was requested, but the point estimate AND spread calculations (if applicable) returned NA.

Value

A data frame of NCA parameter results summarized according to the summarization settings.

Details

Excluded results will not be included in the summary.

See also

Examples

conc_obj <- PKNCAconc(as.data.frame(datasets::Theoph), conc~Time|Subject)
d_dose <- unique(datasets::Theoph[datasets::Theoph$Time == 0,
                                  c("Dose", "Time", "Subject")])
dose_obj <- PKNCAdose(d_dose, Dose~Time|Subject)
data_obj_automatic <- PKNCAdata(conc_obj, dose_obj)
results_obj_automatic <- pk.nca(data_obj_automatic)
# To get standard results run summary
summary(results_obj_automatic)
#>  start end  N     auclast        cmax               tmax   half.life aucinf.obs
#>      0  24 12 74.6 [24.3]           .                  .           .          .
#>      0 Inf 12           . 8.65 [17.0] 1.14 [0.630, 3.55] 8.18 [2.12] 115 [28.4]
#> 
#> Caption: auclast, cmax, aucinf.obs: geometric mean and geometric coefficient of variation; tmax: median and range; half.life: arithmetic mean and standard deviation
#> 
# To enable numeric conversion and extraction, do not give a spread function
# and subsequently run as.numeric on the result columns.
PKNCA.set.summary(
  name=c("auclast", "cmax", "half.life", "aucinf.obs"),
  point=business.geomean,
  description="geometric mean"
)
PKNCA.set.summary(
  name=c("tmax"),
  point=business.median,
  description="median"
)
summary(results_obj_automatic, not.requested.string="NA")
#>  start end  N auclast cmax tmax half.life aucinf.obs
#>      0  24 12    74.6   NA   NA        NA         NA
#>      0 Inf 12      NA 8.65 1.14      7.99        115
#> 
#> Caption: auclast, cmax, half.life, aucinf.obs: geometric mean; tmax: median
#>