A queue report can scan compact severity values, count tickets at or above a selected threshold, and keep a separate high-severity total.

Program

Play the script to choose the minimum severity and inspect the queue counts.

incident_queue_report.R
min_severity <- 
severities <- c(1, 3, 2, 3)
visible_count <- sum(severities >= min_severity)
high_count <- sum(severities == 3)
line <- paste(min_severity, visible_count, high_count)
cat(line, "\n", sep = "")
min_severity <- 
severities <- c(1, 3, 2, 3)
visible_count <- sum(severities >= min_severity)
high_count <- sum(severities == 3)
line <- paste(min_severity, visible_count, high_count)
cat(line, "\n", sep = "")
min_severity <- 
severities <- c(1, 3, 2, 3)
visible_count <- sum(severities >= min_severity)
high_count <- sum(severities == 3)
line <- paste(min_severity, visible_count, high_count)
cat(line, "\n", sep = "")
threshold count `sum(severities >= min_severity)` counts incidents at or above the selected severity.
independent count The high-severity counter is separate from the visible threshold.
loop-free report Vectorized comparisons keep the report deterministic and compact.