plot_medication_frequency {tame} | R Documentation |
Plot Medication Frequency
Description
This function plots the medication frequency.
Usage
plot_medication_frequency(object, ...)
## S3 method for class 'medic'
plot_medication_frequency(object, ...)
## S3 method for class 'summary.medic'
plot_medication_frequency(object, ...)
## S3 method for class 'medication_frequency'
plot_medication_frequency(
object,
scale = "percent",
scope = "cluster",
with_population = FALSE,
...
)
Arguments
object |
The object containing the medication frequency 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". |
with_population |
Logical value indicating whether to include the population cluster. |
Value
A ggplot object.
See Also
Examples
clust <- medic(complications, id = id, atc = atc, k = 3)
clust |> plot_medication_frequency()
clust |> medication_frequency() |> plot_medication_frequency()
clust |> summary() |> plot_medication_frequency()
[Package tame version 0.2.0 Index]