"Hit <Return> To See Next Plot" Incompatible with Shiny Automation

The following code displays multiple Naïve Bayesian plots. However, you only see them after pressing enter in the console. If you wanted to view the plot in a shiny dashboard, you will need to click 'Enter' on the keyboard. Also, it will only display one plot, not all of them.

library(klaR)

data(iris)
mN <- NaiveBayes(Species ~ ., data = iris)
plot(mN)

Is there a way for shiny to automatically display all plots on the dashboard without the need to press 'Enter' on the console?

Same nuisance with OLS regression plots. Try

par(mfrow=c(2,2))

before the plot call. It should open a 2x2 window.

My actual data has 32 columns, therefore 32 plots. If I can fit them all on one window, they are all very small. Is there a way of splitting the plots to appear on separate windows?

Better-yet, a method to only display one plot be ideal.

I'm not very Shiny, so I'm not sure if there's a way to handle these in chunks. You may get some help by taking a look at Hadley's *ggplot2` appendix C on how to get down and dirty with plot viewpoints. He recommends reading a chapter from RGraphics to get oriented to the grid underpinnings.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.