Wordcloud from tf-idf results
wordcloud_tfidf(
obj,
label_var = "celltype",
cluster_var = "cluster",
terms_per_cluster = 10,
show_plot = TRUE,
...
)Single-cell data object.
Which cell metadata column to input to NLP analysis.
Which cell metadata column to use to identify which cluster each cell is assigned to.
The maximum number of words to return per cluster.
Whether to print the plot.
Additional parameters passed to ggplot2::ggplot(aes(...)).
A list containing:
The wordcloud ggplot object.
The TF-IDF results data.frame.
data("pseudo_seurat")
if (requireNamespace("ggwordcloud", quietly = TRUE)) {
wordcloud_res <- wordcloud_tfidf(obj = pseudo_seurat,
label_var = "celltype",
cluster_var = "cluster")
}
#> Extracting obsm from Seurat: umap
#> + Dropping 2 conflicting obs variables: UMAP.1, UMAP.2
#> Setting cell metadata (obs) in obj.
#> Warning: Ignoring unknown aesthetics: label