Hi @bbb32
I think the following code will do what you are hoping. Let me know if I've misinterpreted your question.
library(shiny)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
numericInput('A', label = 'A', value = 55),
numericInput('B', label = 'B', value = 90)),
mainPanel(plotOutput('barplot')))
)
server <- function(input, output, session){
output$barplot <- renderPlot({
data <- data.frame(cat = c('A', 'B'),
val = c(input$A, input$B))
barplot(data$val, names.arg = data$cat)
})
}
shinyApp(ui, server)