简体   繁体   English

如何在Shiny R中保存编辑

[英]How to save edits in Shiny R

I want my end users to be able to update and save comments in a table , through shiny (Action button). 我希望我的最终用户能够通过闪亮的(“操作”按钮)将评论更新并保存在表格中。 If i use the following code , it does open the table, but when i close it , it doesn't save the changes. 如果我使用以下代码,则它确实会打开表,但是当我关闭它时,它不会保存更改。 Here is a sample code: 这是一个示例代码:

library(shiny)
library(DT)
library(ggplot2)

shinyApp(
  ui = fluidPage(
    actionButton("Approve", "Click for Approval"),
    tableOutput('edit')
  ),
  server = function(input, output, session) {

    output$edit<- eventReactive(input$Approve, 
    sp.1 <-  edit(mpg))


  }
)

How do i make it save the changes ? 我如何使其保存更改?

您将需要一个外部文件来存储注释,并在需要时使用Shiny服务器功能进行读写。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM