if (interactive()) {
library(shiny)
library(DT)
library(jstable)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(FileRepeatedInput("datafile")),
mainPanel(
tabsetPanel(
type = "pills",
tabPanel("Data", DTOutput("data")),
tabPanel("Label", DTOutput("data_label"))
)
)
)
)
server <- function(input, output, session) {
data_info <- callModule(FileRepeated, "datafile")
output$data <- renderDT({
data_info()$data
})
output$label <- renderDT({
data_info()$label
})
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab