Hi All,
See topic, Anybody could help me to make the following code working? Thanks in advance.
library(shiny)
runApp(list(ui = fluidPage(
sidebarLayout(
sidebarPanel(
h4("Uploading Files"),
fileInput('f1', 'Choose a RData File', accept=c('.RData'))
),
mainPanel(
"Data",
h4("Data Information"),
verbatimTextOutput("datastr")
)
)
),
server = function(input, output) {
dataInput <- reactive({
sessionEnvir <- sys.frame()
if (!is.null(input$f1)) load(input$f1$datapath, sessionEnvir)
})
output$datastr <- renderPrint({
if (is.null(dataInput())) return() else str(dataInput())
})
}
))