上传数据,调用r脚本并更改数据,使用ShinyApp下载

上传数据,调用r脚本并更改数据,使用ShinyApp下载,r,dataframe,shiny,shiny-server,reactive,R,Dataframe,Shiny,Shiny Server,Reactive,我想上传一个数据帧,调用r scipt并应用一个更新数据帧的函数,然后下载它。有人能帮我吗 假设这是我需要调用的函数 Identify_IP(dataframe) return(dataframe') 这是一款闪亮的应用程序 library(shiny) source('InflectionP2.R', local = TRUE) runApp( list( ui = fluidPage( titlePanel("Upload your file"),

我想上传一个数据帧,调用r scipt并应用一个更新数据帧的函数,然后下载它。有人能帮我吗

假设这是我需要调用的函数

Identify_IP(dataframe)
return(dataframe')
这是一款闪亮的应用程序

library(shiny)

source('InflectionP2.R', local = TRUE)

runApp(
  list(
    ui = fluidPage(
      titlePanel("Upload your file"),
      sidebarLayout(
        sidebarPanel(
          fileInput('file1', 'Choose xls file',
                    accept = c(".XLS")),

          actionButton("btn", "Update Table")
        ),

      mainPanel(
        tableOutput('what'))
      )
    ),

    server = function(input, output, session){

      dataframe <- reactive({
        inFile <- input$file1
        if (is.null(input$file1))
          return(NULL)
      Identify_IP(read.table(inFile$datapath, header=input$header, sep=input$sep, quote=input$quote))
        })

      observeEvent(input$btn, {output$what <- renderTable({dataframe})})
          }
)
)
库(闪亮)
source('deflectionp2.R',local=TRUE)
runApp(
名单(
ui=fluidPage(
titlePanel(“上传您的文件”),
侧边栏布局(
侧栏面板(
fileInput('file1','Choose xls file',
接受=c(“.XLS”),
操作按钮(“btn”,“更新表”)
),
主面板(
tableOutput('what'))
)
),
服务器=功能(输入、输出、会话){
dataframe通过将()添加到renderTable末尾的dataframe中来解决。并取下:,header=……$quote)通过将()添加到renderTable末尾的dataframe中来解决。取下:,header=…$quote)