makeCostPlot: Make plot of costs

Description Usage Arguments Value Examples

View source: R/plots.R

Description

Plots the cumulative probabilities of costs for a battle simulation

Usage

1
2
3
4
5
6
makeCostPlot(
  simulationResults,
  attackCol = "red",
  defenceCol = "blue",
  legend = T
)

Arguments

simulationResults,

formatted as: simulationResults

attackCol

color to use when side is 'attacker'

defenceCol

color to use when side is 'defender'

legend

logical() whether to add a legend to the plot

Value

ggplot object

Examples

1
2
3
4
5
 sim <- simulateBattles("30 inf 11 arm 5 ftr arm",
        "40 inf 3 ftr",
        iterations = 1000,
        replications = 2)
 makeCostPlot(sim)

edvinf/aaSimulator documentation built on June 1, 2020, 12:10 p.m.