Learn R Programming

tame (version 0.2.0)

plot_timing_atc_group: Plot Timing ATC Group

Description

This function plots the timing ATC group.

Usage

plot_timing_atc_group(object, ...)

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

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

# S3 method for timing_atc_group plot_timing_atc_group( object, focus = "average", with_population = FALSE, max_lines = 50, ... )

Value

A ggplot object.

Arguments

object

The object containing the timing ATC group data.

...

Additional arguments passed to the plotting functions.

focus

The focus of the plot. Must be either "average", "individual" or "both".

with_population

Logical value indicating whether to include the population cluster.

max_lines

The maximum number of lines to plot.

See Also

timing_atc_group

plot_cluster_frequency

plot_medication_frequency

plot_comedication_count

plot_timing_trajectory

plot_summary

Examples

Run this code
clust <- medic(
  complications,
  id = id,
  atc = atc,
  k = 3:5,
  timing = first_trimester:third_trimester
)

clust |> plot_timing_atc_group()
clust |> timing_atc_group() |> plot_timing_atc_group()
clust |> summary() |> plot_timing_atc_group()

Run the code above in your browser using DataLab