Linear Discriminant Analysis

Hi Could someone help is in creating ldshist plotOutput UI and render plot dynamically, instead of hard coding in r script
for example in iris dataset, we know that Species is the categorical dependent variable and it is three groups within that so when we prepare ldahist we will have 2 charts to review the overlap, as show below
ldahist(data = p_lda$x[,1],g = trainData$Species] )
ldahist(data = p_lda$x[,2],g = trainData$Species] )
here we make two plotOutput and two renderPlot

but in some other datasets, if we have 5 groups under dependent variable, instead of hard coding, is there any possibility to create plotOutput(id....... and also output$........ dynamically
Thank you very much in Advance
GP

You can study how to make dynamic UI
here : Chapter 10 Dynamic UI | Mastering Shiny (mastering-shiny.org)

For specific help with your case, you will increase your odds of getting forum support by providing a reprex

1 Like