I have been trying to run an app in showcase mode from Rstudio 1.3.1093 and keep getting the error "cannot coerce type 'closure' to vector of type 'character' [No stack trace available]"
The same error appears when I run runExample("01_hello")
I am trying to run this on a CentOS 7 machine with R 3.6.0 and Shiny 1.4.0.2 (I don't have any control over OS, R, or Shiny version I can use).
Do you have any suggestions about what is going wrong here?
I'm familiar with the error type, but I don't understand why it's happening in an included example application. If it was just happening in my code I could understand it, but the fact that it occurs in the runExample() function befuddles me.
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.