Shiny outputs are display targets that can be ready or waiting for data.

Program

Play the script to choose a modeled output and see whether it is ready.

output_index
output_status.R
Replay: real traced execution (multi-file project)
output_index <- 1
outputs <- c("text", "table", "chart")
ready <- c(TRUE, TRUE, FALSE)[output_index]
state <- ifelse(ready, "ready", "waiting")
output <- outputs[output_index]
label <- paste(output, state, sep = ":")
cat(label, "\n", sep = "")
output_index <- 2
outputs <- c("text", "table", "chart")
ready <- c(TRUE, TRUE, FALSE)[output_index]
state <- ifelse(ready, "ready", "waiting")
output <- outputs[output_index]
label <- paste(output, state, sep = ":")
cat(label, "\n", sep = "")
output_index <- 3
outputs <- c("text", "table", "chart")
ready <- c(TRUE, TRUE, FALSE)[output_index]
state <- ifelse(ready, "ready", "waiting")
output <- outputs[output_index]
label <- paste(output, state, sep = ":")
cat(label, "\n", sep = "")
  1. output_index ← 1

    1output_index <- 12outputs <- c("text", "table", "chart")
    values this step1output_index
  2. outputs ← text, table, chart

    1output_index <- 12outputs <- c("text", "table", "chart")3ready <- c(TRUE, TRUE, FALSE)[output_index]
    values this steptext, table, chartoutputs
  3. ready ← TRUE

    2outputs <- c("text", "table", "chart")3ready <- c(TRUE, TRUE, FALSE)[output_index]4state <- ifelse(ready, "ready", "waiting")
    values this stepTRUEready1output_index
  4. state ← ready

    3ready <- c(TRUE, TRUE, FALSE)[output_index]4state <- ifelse(ready, "ready", "waiting")5output <- outputs[output_index]
    values this stepreadystateTRUEready
  5. output ← text

    4state <- ifelse(ready, "ready", "waiting")5output <- outputs[output_index]6label <- paste(output, state, sep = ":")
    values this steptextoutput1output_index
  6. label ← text:ready

    5output <- outputs[output_index]6label <- paste(output, state, sep = ":")7cat(label, "\n", sep = "")
    values this steptext:readylabeltextoutputreadystate
  7. cat(label, " ", sep = "")

    6label <- paste(output, state, sep = ":")7cat(label, "\n", sep = "")
    outputtext:ready
    values this steptext:readylabel
  1. output_index ← 2

    1output_index <- 22outputs <- c("text", "table", "chart")
    values this step2output_index
  2. outputs ← text, table, chart

    1output_index <- 22outputs <- c("text", "table", "chart")3ready <- c(TRUE, TRUE, FALSE)[output_index]
    values this steptext, table, chartoutputs
  3. ready ← TRUE

    2outputs <- c("text", "table", "chart")3ready <- c(TRUE, TRUE, FALSE)[output_index]4state <- ifelse(ready, "ready", "waiting")
    values this stepTRUEready2output_index
  4. state ← ready

    3ready <- c(TRUE, TRUE, FALSE)[output_index]4state <- ifelse(ready, "ready", "waiting")5output <- outputs[output_index]
    values this stepreadystateTRUEready
  5. output ← table

    4state <- ifelse(ready, "ready", "waiting")5output <- outputs[output_index]6label <- paste(output, state, sep = ":")
    values this steptableoutput2output_index
  6. label ← table:ready

    5output <- outputs[output_index]6label <- paste(output, state, sep = ":")7cat(label, "\n", sep = "")
    values this steptable:readylabeltableoutputreadystate
  7. cat(label, " ", sep = "")

    6label <- paste(output, state, sep = ":")7cat(label, "\n", sep = "")
    outputtable:ready
    values this steptable:readylabel
  1. output_index ← 3

    1output_index <- 32outputs <- c("text", "table", "chart")
    values this step3output_index
  2. outputs ← text, table, chart

    1output_index <- 32outputs <- c("text", "table", "chart")3ready <- c(TRUE, TRUE, FALSE)[output_index]
    values this steptext, table, chartoutputs
  3. ready ← FALSE

    2outputs <- c("text", "table", "chart")3ready <- c(TRUE, TRUE, FALSE)[output_index]4state <- ifelse(ready, "ready", "waiting")
    values this stepFALSEready3output_index
  4. state ← waiting

    3ready <- c(TRUE, TRUE, FALSE)[output_index]4state <- ifelse(ready, "ready", "waiting")5output <- outputs[output_index]
    values this stepwaitingstateFALSEready
  5. output ← chart

    4state <- ifelse(ready, "ready", "waiting")5output <- outputs[output_index]6label <- paste(output, state, sep = ":")
    values this stepchartoutput3output_index
  6. label ← chart:waiting

    5output <- outputs[output_index]6label <- paste(output, state, sep = ":")7cat(label, "\n", sep = "")
    values this stepchart:waitinglabelchartoutputwaitingstate
  7. cat(label, " ", sep = "")

    6label <- paste(output, state, sep = ":")7cat(label, "\n", sep = "")
    outputchart:waiting
    values this stepchart:waitinglabel
output target An output name identifies where a value would be displayed.
readiness A boolean flag can model whether the output has enough data to display.
display state Combining the output name and state gives a compact UI status.