Debugging and Inspection
Debug Flags
Review Pipeline Stages
Debug flags identify which stage has already been checked and which stage still needs review.
Program
Play the script to choose a stage and see its inspection status.
debug_flags.R
stage_index <-
stages <- c("parse", "clean", "render")
checked <- c(TRUE, FALSE, TRUE)
stage <- stages[stage_index]
status <- ifelse(checked[stage_index], "checked", "review")
label <- paste(stage, status, sep = ":")
cat(label, "\n", sep = "")
stage_index <-
stages <- c("parse", "clean", "render")
checked <- c(TRUE, FALSE, TRUE)
stage <- stages[stage_index]
status <- ifelse(checked[stage_index], "checked", "review")
label <- paste(stage, status, sep = ":")
cat(label, "\n", sep = "")
stage_index <-
stages <- c("parse", "clean", "render")
checked <- c(TRUE, FALSE, TRUE)
stage <- stages[stage_index]
status <- ifelse(checked[stage_index], "checked", "review")
label <- paste(stage, status, sep = ":")
cat(label, "\n", sep = "")
stage list
A vector names the ordered stages being inspected.
debug flag
A logical vector stores whether each stage has been checked.
status label
Combining stage and status creates a compact debugging summary.