survival.heatmap: Heatmap of population survival duration in NetLogo...

Description Usage Arguments Details Value Examples

View source: R/PlotNetLogoData.R

Description

Generates a plot with three dimensions of data: two experimental parameters (for instance, toxin concentration and diffusion rate) as axes, and the number of timepoints that each population survived before extinction given as a color gradient from pale to dark red. It is a snapshot of several experiments from a parameter sweep, at a single timepoint. For ease of interpretation, the boxes in the heatmap can be labeled by run number.

Usage

1
survival.heatmap(ends.df, xvar, yvar, nums = FALSE)

Arguments

ends.df

Dataframe of endpoint data, generated by extract.endpoint().

xvar

Experimental parameter for plotting on x-axis. Must be a column name of ends.df, with no quotation marks.

yvar

Experimental parameter for plotting on y-axis. Must be a column name of ends.df, with no quotation marks.

nums

Should each box in the heatmap be labeled with its run number? T/F. Default: F

Details

As with other endpoint-summary plots, this function can be used with data from any timepoint, as long as the ends.df dataframe contains data from only one timepoint per run number. For a function to create a heatmap with any variable you wish (instead of population survival), see [phenoevo.heatmap()].

Value

A ggplot object using geom_tile. This can be modified in the typical ggplot way by adding layers, scales, etc.

Examples

1
2
data(PE.ends)
survival.heatmap(PE.ends, toxin.conc, env.noise, nums=TRUE)

jessicaaudreylee/PhenoEvoR documentation built on Sept. 7, 2020, 3:50 a.m.