Description Usage Arguments Details Value Examples
View source: R/summarize_binary_covariate_clusters.R
Summarize binary covariate clusters
1 | summarize_binary_clusters(df, covariate_name = "x")
|
df |
data frame with the following columns
|
covariate_name |
name of the single binary covariate |
Condense data from data frames about each individuals to the summary of the number of indivduals who have a particular covariate feature (1/0). This assumes the trees are in order by generation.
a data frame with the following columns
frequency of the following clusters
total size of the cluster
number of individuals in the cluster with the feature of interest =1
number of individuals in the cluster with the feature of interest = 0
1 2 3 4 5 6 7 8 9 | example_cluster <- data.frame(cluster_id = c(1, 1, 1,
2, 2,
3, 3, 3, 3,
4),
x = c(0, 1, 1,
0, 0,
1, 0, 1, 1,
0))
summarize_binary_clusters(example_cluster)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.