-1

I am current working on a Shiny application where clValid is used to validate the clustering algorithms. After I get the result using intern <- clValid(...), I can print the three figures in the console by hitting the <Enter> button. However, for a shiny application, how can I plot all the three figures at the same time?

==== more detail

Here's typical code to get validation result

data(mouse)

## internal validation
express <- mouse[1:25,c("M1","M2","M3","NC1","NC2","NC3")]
rownames(express) <- mouse$ID[1:25]
intern <- clValid(express, 2:6, clMethods=c("hierarchical","kmeans","pam"),
validation="internal")
## view results
plot(intern)

However, figures will not plot automatically, and you have to hit <Enter> to view all the figures as follows:

> plot(intern)
Hit <Return> to see next plot: 
Hit <Return> to see next plot: 
Hit <Return> to see next plot: 

My question is, if Shiny is used, a plotOutput lies in the ui.R as:

mainPanel(
    plotOutput("clust_valid_plot")  
)

how can I print all the three plots to the clust_valid_plot?

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Steven Luo
  • 2,350
  • 3
  • 18
  • 35
  • It would be great if you could supply a minimal reproducible example to go along with your question. Something we can work from and use to show you how it might be possible to answer your question. That way others can also befit form your question, and the accompanying answer, in the future. You can have a look at [this SO post](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on how to make a great reproducible example in R. – Eric Fail Jan 14 '16 at 05:40
  • Use the source, luke. – Has QUIT--Anony-Mousse Jan 15 '16 at 09:35

1 Answers1

0

OK. I solved this problem by looking into the S4 class in R. To be more specific, you can list all the solt names in S4 class using slotNames(intern). Then you can draw each line.

Steven Luo
  • 2,350
  • 3
  • 18
  • 35