cluster_frequency {tame} | R Documentation |
The Frequency of Assignment to Each Cluster
Description
The function cluster_frequency()
calculates the number and frequency of
individuals assigned to each cluster.
Usage
cluster_frequency(
object,
only = NULL,
clusters = NULL,
additional_data = NULL,
...
)
Arguments
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. |
Details
cluster_frequency()
calculates the number of individuals assigned to
each cluster and the associated frequency of assignment.
Value
cluster_frequency()
returns a data frame with class
cluster_frequency
.
-
Clustering
the name of the clustering. -
Cluster
the cluster name. -
Count
the number of individuals assigned to the cluster. -
Percent
the percent of individuals assigned to the cluster.
Examples
clust <- medic(complications, id = id, atc = atc, k = 3:5)
# make frequency tables
cluster_frequency(clust, k == 5)
cluster_frequency(clust, k < 5, I:III)