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_status.R
output_index <- 
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 <- 
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 <- 
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 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.