plot_spot: Spot Plot

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Plots a spot matrix.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_spot(object, ...)

## S4 method for signature 'matrix'
plot_spot(object, threshold = NULL, diag = TRUE, upper = TRUE, ...)

## S4 method for signature 'dist'
plot_spot(object, diag = FALSE, upper = FALSE, ...)

## S4 method for signature 'OccurrenceMatrix'
plot_spot(object, diag = FALSE, upper = FALSE, ...)

Arguments

object

An abundance matrix to be plotted.

...

Extra parameters to be passed to threshold.

threshold

A function that takes a numeric vector as argument and returns a numeric threshold value. If NULL (the default), no threshold is computed.

diag

A logical scalar indicating whether the diagonal of the matrix should be plotted.

upper

A logical scalar indicating whether the upper triangle of the matrix should be plotted.

Details

The spot matrix can be considered as a variant of the Bertin diagram where the data are first transformed to relative frequencies.

Value

A ggplot2::ggplot object.

Note

Adapted from Dan Gopstein's original idea.

Author(s)

N. Frerebeau

See Also

Other plot: plot_bar, plot_diversity, plot_line, plot_matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Plot spot diagram of count data...
data("mississippi", package = "folio")
counts <- as_count(mississippi)

### ...without threshod
plot_spot(counts)
### ...with the  column means as threshold
plot_spot(counts, threshold = mean)
### ...with the column medians as threshold
plot_spot(counts, threshold = median)

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