Learn R Programming

richCluster (version 1.0.2)

term_bar: Term-level Bar Plot for a Specific Cluster

Description

Creates a horizontal bar plot showing enrichment values for individual terms in a selected cluster.

Usage

term_bar(cluster_result, cluster = 1, value_type = "Padj", title = NULL)

Value

A plotly object representing the bar plot.

Arguments

cluster_result

A result list returned by cluster.

cluster

Cluster ID (numeric) or term name (character) to visualize.

value_type

The column name to use for enrichment significance ("Padj" or "Pvalue").

title

Optional plot title. If NULL, a default will be generated.

Examples

Run this code
# \donttest{
# Load example data
cluster_result <- readRDS(system.file("extdata", "cluster_result.rds",
                                      package = "richCluster"))
tbar <- term_bar(cluster_result, cluster = 1)
tbar
# }

Run the code above in your browser using DataLab