Description Usage Arguments Details Value Examples
Calculate and plot posterior distribution for battle
1 2 3 4 5 6 7 | makePosteriorDistributionPlot(
simulationResults,
side = "attacker",
attackCol = "red",
defenceCol = "blue",
ylim = c(0, 1)
)
|
simulationResults, |
formatted as: |
side |
character(), side to calculate distribution for, either 'attacker' or 'defender' |
attackCol |
color to use when side is 'attacker' |
defenceCol |
color to use when side is 'defender' |
ylim |
limits for y-axis |
Plotter error bars are the ranges of the reported probabilities across replicates.
ggplot object
1 2 3 4 5 6 | sim <- simulateBattles("30 inf 11 arm 5 ftr arm",
"40 inf 3 ftr",
iterations = 1000,
replications = 2)
makePosteriorDistributionPlot(sim, "attacker")
makePosteriorDistributionPlot(sim, "defender")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.