Learn R Programming

tame (version 0.2.0)

plot_comedication_count: Plot Comedication Count

Description

This function plots the comedication count.

Usage

plot_comedication_count(object, ...)

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

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

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

Value

A ggplot object.

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.

See Also

comedication_count

plot_cluster_frequency

plot_medication_frequency

plot_timing_trajectory

plot_timing_atc_group

plot_summary

Examples

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

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

Run the code above in your browser using DataLab