outcome_histograms: Create histograms summarizing whale-ship outcomes

View source: R/outcome_histograms.R

outcome_histogramsR Documentation

Create histograms summarizing whale-ship outcomes

Description

This function produces pretty histograms of the posterior distributions of outcome predictions (the default is to only show the outcomes for scenarios in which strike zone is 1.5x draft and avoidance is a function of vessel speed).

Usage

outcome_histograms(
  outcomes,
  surface_var = "surface2",
  collision_var = "collision2.2",
  mortality_var = "mortality2.2",
  plot_all = FALSE,
  orientation = "vertical"
)

Arguments

outcomes

A data.frame of results from the shipstrike::gather_outcomes() function.

surface_var

The 'strike zone event' variable to use ("surface1" or "surface2")

collision_var

The collision variable to use. See output of outcome_predict().

mortality_var

The mortality variable to use. See output of outcome_predict().

orientation

Character; "vertical" or "horizontal".

Value

A ggplot2 object.


ericmkeen/shipstrike documentation built on May 21, 2023, 7:05 a.m.