سؤال

i want to upload two data tables in shiny, hox can i do that ?

shinyUI(pageWithSidebar(
 headerPanel("Représentation de Weibull"),
 sidebarPanel(
  fileInput("file1", "choose your first data"),
## fileinput("file2", "choose your second data"), ##but it doesn't work !

  checkboxInput("fit.weibull", label = "Ajuster une loi de Weibull", value = FALSE),
sliderInput("reg.range", label = "Zone d'ajustement", min = 0, max = 100000,
            value = c(10000, 40000))
هل كانت مفيدة؟

المحلول

You have a typo. fileInput rather then fileinput

require(shiny)
runApp(
  list(ui = pageWithSidebar(
    headerPanel("Représentation de Weibull"),
    sidebarPanel(
      fileInput("file1", "choose your first data"),
      fileInput("file2", "choose your second data"), ##but it doesn't work !

      checkboxInput("fit.weibull", label = "Ajuster une loi de Weibull", value = FALSE),
      sliderInput("reg.range", label = "Zone d'ajustement", min = 0, max = 100000,
                  value = c(10000, 40000))
    ),
    mainPanel(
      textOutput('filea'),
      textOutput('fileb')
    )

  ),
  server =function(input, output)({
    output$filea <- renderText({
      input$file1$datapath
    })
    output$fileb <- renderText({
      input$file2$datapath
    })

  })
  )
)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top