Что-то вроде этой работы:?
library(shiny)
ui <- fluidPage(titlePanel("Demo Interface"),
sidebarLayout(
sidebarPanel(
textInput("text1", "STATE:",value = " "),
textInput("text2", "REVNUE:",value =" "),
numericInput("text3", "RATE OF GROWTH:",value = " "),
numericInput("text4", "STATES OWN TAX",value = " "),
numericInput("text5", "REVENUE BUOYANCY",value = " "),
actionButton("submit1", strong("Submit"))
),
mainPanel(
verbatimTextOutput("txt1"),
verbatimTextOutput("txt2"),
verbatimTextOutput("txt3"),
verbatimTextOutput("txt4"),
verbatimTextOutput("txt5"),
verbatimTextOutput("txt6")
)
)
)
server <- function(input,output){
mdata <- eventReactive(input$submit1,{
data <- c(input$text1,input$text2,input$text3,input$text4,input$text5)
data[is.na(data)] <- ""
data
})
output$txt1 <- renderText({paste("state name is as :", mdata()[1])})
output$txt2 <-renderText({paste("revenue is as :", mdata()[2])})
output$txt3 <-renderText({ paste("rate of growth :", mdata()[3])})
output$txt4 <-renderText({paste("state own tax :", mdata()[4])})
output$txt5 <-renderText({paste("revenue buoyancy :", mdata()[5])})
}
shinyApp(ui, server)