Learn R Programming

DeSciDe (version 1.0.2)

plot_heatmap: Plot Heatmap

Description

Create and optionally save a heatmap of the PubMed search results.

Usage

plot_heatmap(pubmed_search_results, file_directory = NULL, export = FALSE)

Value

Invisibly returns a HeatmapList object.

Arguments

pubmed_search_results

A data frame containing raw search results with genes and terms.

file_directory

Directory for saving the output plot. Defaults to NULL.

export

Logical indicating whether to export the plot. Defaults to FALSE.

Examples

Run this code
# Example data frame
data <- data.frame(Gene = c("Gene1", "Gene2"),
                   Term1 = c(10, 20),
                   Term2 = c(5, 15),
                   Total = c(15, 35),
                   PubMed_Rank = c(1, 2))
plot_heatmap(data, file_directory = tempdir(), export = FALSE)

Run the code above in your browser using DataLab