plot_comedication_count: Plot Comedication Count

View source: R/plot.R

plot_comedication_countR Documentation

Plot Comedication Count

Description

This function plots the comedication count.

Usage

plot_comedication_count(object, ...)

## S3 method for class 'medic'
plot_comedication_count(object, ...)

## S3 method for class 'summary.medic'
plot_comedication_count(object, ...)

## S3 method for class 'comedication_count'
plot_comedication_count(
  object,
  scale = "percent",
  scope = "cluster",
  focus = "people",
  with_population = FALSE,
  ...
)

Arguments

object

The object containing the comedication count data.

...

Additional arguments passed to the plotting functions.

scale

The scale of the y-axis. Must be either "percent" or "count".

scope

The scope of the plot. Must be one of "cluster", "global" or "medication count".

focus

The focus of the plot. Must be either "people" or "medication".

with_population

Logical value indicating whether to include the population cluster.

Value

A ggplot object.

See Also

comedication_count

plot_cluster_frequency

plot_medication_frequency

plot_timing_trajectory

plot_timing_atc_group

plot_summary

Examples

clust <- medic(complications, id = id, atc = atc, k = 3)

clust |> plot_comedication_count()
clust |> comedication_count() |> plot_comedication_count()
clust |> summary() |> plot_comedication_count()


tame documentation built on April 12, 2025, 1:40 a.m.