Skip to contents

Plot the distribution of condition classes by predicted year

Usage

plotPrediction(
  prediction,
  legend_pos = c("bottom", "left", "top", "right", "none")[5],
  do_print = TRUE
)

Arguments

prediction

data frame with columns prob1, prob2, ..., pipeLength, InspectionYear

legend_pos

legend position: one of "bottom", "left", "top", "right", "none"

do_print

logical indicating whether to actually print the plot to the current graphical device.

Examples


prediction <- data.frame(
  prob1 = c(0, 1, 0, 0.0, 0),
  prob2 = c(1, 0, 0, 0.5, 0),
  prob3 = c(0, 0, 0, 0.5, 1),
  prob4 = c(0, 0, 1, 0.0, 0),
  pipeLength = 1:5,
  InspectionYear = seq(2001, 2005)
)

kwbGompitz:::plotPrediction(prediction, legend_pos = "right")