plot_categorical_covariates_distributions: Categorical covariates distributions bar charts

View source: R/plot_categorical_covariates_distributions.R

plot_categorical_covariates_distributionsR Documentation

Categorical covariates distributions bar charts

Description

Plots the distributions of the selected categorical covariates.

Usage

plot_categorical_covariates_distributions(
  run,
  covariates = NULL,
  frequency = FALSE,
  order = TRUE,
  drop = FALSE,
  bar_adjustment = "dodge",
  baseline_only = TRUE,
  auto_legend = TRUE
)

Arguments

run

pmxploit NONMEM run object.

covariates

character vector of categorical covariates names. Default is NULL, returning all categorical covariates.

frequency

logical. Plot frequency instead of count on the y-axis.

bar_adjustment

character. ggplot2 position argument. One of identity, dodge, jitterdodge, jitter, nudge and stack. (see ggplot2 documentation). Default is dodge.

baseline_only

logical. Consider only the baseline (= first) values of the subjects. Default is TRUE.

auto_legend

logical. When TRUE (default), default pmxploit plotting options are applied (title, labels, axis...).

split_by

character. Name of a categorical covariate used to split the distributions.

Value

A ggplot2 object.

Examples

EXAMPLERUN %>%
  plot_categorical_covariates_distributions(covariates = c("SEX", "STUD"))

EXAMPLERUN %>%
  group_by(SEX) %>%
  plot_categorical_covariates_distributions(covariates = "STUD",
                                            frequency = TRUE)

pnolain/pmxploit documentation built on Jan. 31, 2024, 1:16 p.m.