cat_heatmap: Plot heatmap to show relationship between two categorical...

View source: R/plot.R

cat_heatmapR Documentation

Plot heatmap to show relationship between two categorical variables

Description

For instance, are papers for certain techniques more likely to be in certain journals? Is there an association between species and journal? This is just for visualization. Use ‘fisher.test' to see if it’s significant. I still wonder if I should rewrite this with ggplot2, which is more work than base R in this case.

Usage

cat_heatmap(pubs, row_var, col_var, ...)

Arguments

pubs

A data frame with at least these columns:

journal

Name of the journal of the paper.

year

Year when the paper was published.

There must be one row per publication or per method or species for each title if faceting by those. If facetting, then a column whose name is the value in 'facet_by' must be present.

row_var

Variable for rows of the heatmap. Tidyeval is supported.

col_var

Variable for columns of the heatmap.

...

Extra arguments to pass to 'heatmap'

Value

A base R heatmap is plotted to the current device.


pachterlab/museumst documentation built on July 25, 2022, 11:53 a.m.