Ideally, a reprex is cut-and-paste for the reader to reproduce the behavior.
library(shiny)
if (interactive()) {
# List all available examples
runExample()
# Run one of the examples
runExample("01_hello")
# Print the directory containing the code for all examples
system.file("examples", package="shiny")
}
This code is good, but only in an interactive environment. I have it working under Ubuntu 20.10; for CentOS, you'll want to review CRAN notes. I think that's probably where the problem lies.
shiny is ok with R (≥ 3.0.2). Cairo is ok with R (≥ 2.4.0).