plot_matrix: Heatmap

Description Usage Arguments Value Author(s) References See Also Examples

Description

Plots a heatmap.

Usage

1
2
3
4
plot_heatmap(object, ...)

## S4 method for signature 'matrix'
plot_heatmap(object)

Arguments

object

An object to be plotted.

...

Further arguments to be passed to internal methods.

Value

A ggplot2::ggplot object.

Author(s)

N. Frerebeau

References

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

See Also

pvi()

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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"))

tabula documentation built on May 25, 2021, 5:11 p.m.