renderPrint in interactive shiny document does not work properly

Hi,

First of all, it's best to create a minimal reproducible example when having issues as your code is missing some parts to run it.

Second, you are trying to output a plot in a renderPrint statement. This doesn't make much sense to me... can you explain the purpose of this? Is it the values you're trying to print?

This is an example:

library(shiny)

ui <- fluidPage(
  actionButton("run", "Run again"),
  plotOutput("myPlot"),
  textOutput("myText")
)

server <- function(input, output, session) {
  
  myData = reactive({
    input$run
    rnorm(100)
  })
  
  output$myPlot = renderPlot({
    hist(myData())
  })
  
  output$myText = renderPrint({
    myData()
  })
}

shinyApp(ui, server)

Hope this helps,
PJ