Learn R Programming

tabula (version 1.6.1)

plot_matrix: Heatmap

Description

Plots a heatmap.

Usage

plot_heatmap(object, ...)

# S4 method for matrix plot_heatmap(object)

Arguments

object

An object to be plotted.

...

Further arguments to be passed to internal methods.

Value

A ggplot2::ggplot object.

References

Desachy, B. (2004). Le s<U+00E9>riographe EPPM: un outil informatis<U+00E9> de s<U+00E9>riation graphique pour tableaux de comptages. Revue arch<U+00E9>ologique de Picardie, 3(1), 39-56. 10.3406/pica.2004.2396.

See Also

pvi()

Other plot: plot_bar, plot_diversity, plot_line, plot_spot()

Examples

Run this code
# NOT RUN {
## Abundance data (data from Desachy 2004)
data("compiegne", package = "folio")
## Coerce dataset to absolute frequencies
counts <- as_count(compiegne)
## Coerce dataset to relative frequencies
freq <- as_composition(compiegne)

## Plot matrix diagram...
plot_heatmap(counts)
plot_heatmap(freq)

## Presence/absence data
inc <- sample(0:1, size = 100, replace = TRUE)
bin <- IncidenceMatrix(data = inc, nrow = 10, ncol = 10)

plot_heatmap(bin) +
  ggplot2::scale_fill_manual(values = c("TRUE" = "black", "FALSE" = "white"))
# }

Run the code above in your browser using DataLab