我有一个很长的表格,我想“保存”一个检查点,稍后再回来,问题仍然可以解决。有办法吗?
下面是一个例子来说明:
用户界面:
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
# Application title
titlePanel("Example of a question"),
# textInput with a name
sidebarLayout(
sidebarPanel(
textInput(inputId = 'text',
label = "What's your name?",
value = '')
),
# Show a plot of the generated distribution
mainPanel(
actionButton(inputId = 'save',
label = 'Save')
)
)
))
服务器:
library(shiny)
# Define server logic
shinyServer(function(input, output) {
observeEvent(input$save, {
## Something that saves the input and keeps it there the next time I
connect
})
})
我想做的就是单击“保存”按钮,下次我进入应用程序时,答案仍然存在。