medication_frequency | R Documentation |
The function medications()
calculates the frequency of the different
unique ATC codes within each cluster.
medication_frequency(
object,
only = NULL,
clusters = NULL,
additional_data = NULL,
...
)
object |
An object for which a summary is desired. |
only |
< The default |
clusters |
< The default |
additional_data |
A data frame with additional data that may be
(left-)joined onto the |
... |
Additional arguments passed to the specific summary sub-function. |
medication_frequency()
calculates the number of individuals with a specific
ATC code within a cluster. Moreover, it calculates the percentage of people
with this medication assigned to this cluster and the percent of people
within the cluster with this medication.
medication_frequency()
returns a data frame with class
medication_frequency
.
Clustering
the name of the clustering.
Cluster
the cluster name.
atc ATC codes.
Count
number of individuals with this ATC code in this cluster.
Percent of All Medication
the percentage of individuals in the study
with this ATC code and cluster.
Percent of Medication in Cluster
the percent of individuals in the
cluster with this ATC code.
clust <- medic(complications, id = id, atc = atc, k = 3:5)
medication_frequency(clust, k == 5, clusters = I:III)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.