heatmap: Plot a heatmap representation of observed and/or imputed...

Description Usage Arguments Details See Also Examples

View source: R/trim_heatmap.R

Description

This function organizes the observed and/or imputed counts into a matrix where rows represent sites and columns represent time points. A bitmap image is constructed in which each pixel corresponds to an element of this matrix. Each pixel is colored according the correspondong count status, and the type of heatmap plot requested ('data', 'imputed' or 'fitted').

Usage

1
2
3
4
5
6
7
8
heatmap(
  z,
  what = c("data", "imputed", "fitted"),
  log = TRUE,
  xlab = "auto",
  ylab = "Site #",
  ...
)

Arguments

z

output of a call to trim.

what

the type of heatmap to be plotted: 'data' (default), 'imputed' or 'fitted'.

log

flag to indicate whether the count should be log-transformed first.

xlab

x-axis label. The default value "auto" will evaluate to either "Year" or "Time point"

ylab

y-axis label

...

other parameters to be passed to plot

Details

The 'imputed' heatmap uses the most elaborate color scheme: Site/time combinations that are observed are colored red, the higher the count, the darker the red. Site/time combinations that are imputed are colored blue, the higher the estimate, the darker the blue.

For the 'data' heatmap, missing site/time combinations are colored gray.

For the 'fitted' heatmap, all site/time combinations are colored blue.

By default, all counts are log-transformed prior to colorization, and observed counts of 0 are indicates as white pixels.

See Also

Other graphical post-processing: plot.trim.index(), plot.trim.totals()

Examples

1
2
3
data(skylark2)
z <- trim(count ~ site + year, data=skylark2, model=3)
heatmap(z,"imputed")

rtrim documentation built on April 21, 2020, 5:06 p.m.