Skip to contents

Predicate that returns TRUE if x carries the "pmx_vpc_plot" class — i.e., it is the ggplot returned by plot_vpc_cont() or plot_build_vpc().

Usage

is_pmx_vpc_plot(x)

Arguments

x

Object to test.

Value

Logical scalar.

Examples

model <- model_mread_load(model = "pkmodel")
#> Loading model from cache.
simout <- df_mrgsim_replicate(data = data_sad, model = model, replicates = 5,
                              dv_var = ODV)
p <- plot_vpc_cont(data = simout)
#> Warning: Multiple unique values of `CMT` detected in `data` after filtering to `EVID == 0`: 2, 3.
#>  Functions assume a single observation type per call.
#>  Pre-filter to a single observation compartment (e.g., `dplyr::filter(data, CMT == <n>)`) before passing to this function.
is_pmx_vpc_plot(p)         # TRUE
#> [1] TRUE
is_pmx_vpc_plot(simout)    # FALSE
#> [1] FALSE