Skip to contents

janitor::tabyl() is used underhood.

Usage

cells_per_cluster_table(clusters, var_name = "Cluster")

cells_per_cluster_table(clusters, var_name = "Cluster")

Arguments

clusters

A vector.

var_name

A character scalar: name of column in the returned dataframe.

Value

A dataframe with frequency of cell-cluster assignments.

A dataframe.

Examples

cells_per_cluster_table(rep(1:3, each = 2))
#>   Cluster n percent
#> 1       1 2     33%
#> 2       2 2     33%
#> 3       3 2     33%
cells_per_cluster_table(rep(c(1, 2), each = 5))
#>   Cluster n percent
#> 1       1 5     50%
#> 2       2 5     50%