R Shiny call tables in dynamic tabs -
i have data tables in dynamic tabs, require user input data. how call tables , process user data dynamic tabs?
library(shiny) library(rhandsontable) df <- data.frame(sample=c(350292, 350293), test=c(2, 3)) runapp(list( ui = pagewithsidebar( headerpanel('dynamic tabs'), sidebarpanel( numericinput("ntabs", 'no. of tabs', 5) ), mainpanel( uioutput('mytabs') ) ), server = function(input, output, session){ output$mytabs = renderui({ ntabs = input$ntabs mytabs = lapply(paste('tab', 1: ntabs), tabpanel, rhandsontable(df)) do.call(tabsetpanel, mytabs) }) } ))
Comments
Post a Comment