outcome_melt: Melt the result of 'predict_outcomes()' to use with...

View source: R/outcome_melt.R

outcome_meltR Documentation

Melt the result of predict_outcomes() to use with tidyverse verbs.

Description

This function may be handy if you want to conduct your own tailored analyses. It melts the results data into a tidyverse-friendly format in which every row is a single prediction. Every function above calls this function internally.

Usage

outcome_melt(
  mr,
  events = c("cooccurrence", "encounter", "surface", "surface2", "collision1.1",
    "collision1.2", "collision1.3", "collision1.4", "collision2.1", "collision2.2",
    "collision2.3", "collision2.4", "mortality1.1", "mortality1.2", "mortality1.3",
    "mortality1.4", "mortality2.1", "mortality2.2", "mortality2.3", "mortality2.4")
)

Arguments

mr

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

events

A character vector of outcome types to retain in the melted dataset.

Value

A melted data.frame


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