Hi I want to build a R shiny application. It will include several different (tabbed) views / plots of the same data. I do not want to repeat my data pre-processing code for each plot. For now I try it like that
reactive({
if(input$allClusters == 1){
filteredData <- rawData
}else{
filteredData <- filter(rawData, cluster_id == input$selectedCluster)
}
})
Using reactive elements. However my if / else does not seem to be evaluated anymore. Do you have any tipps how to be able to a) use the if else again b) if not possible do the filtering in a different way
Thank you very much.
Aucun commentaire:
Enregistrer un commentaire