Since you didn't provide any code to work with or explain your specific situation, I took some liberties and assumptions.
Here is the code, as you change the dropdowns you will see the Print statement change accordingly.
ui <- fluidPage(
# App title ----
titlePanel("Hello Shiny!"),
# Main panel for displaying outputs ----
mainPanel(
selectInput("Input_Ram", "Ram:",
c("A","B","C","D")
),
selectInput("Input_Shyam", "Shyam:",
c("A","B","C","D")
),
selectInput("Input_GhanShyam", "GhanShyam:",
c("A","B","C","D")
),
selectInput("Input_MastRam", "MastRam:",
c("A","B","C","D")
),
# Output: selections ----
verbatimTextOutput("values")
)
)
server <- function(input, output) {
data <- data.frame(RowNames = c("Ram","Shyam","GhanShyam","MastRam"), A = c(1.3,3.2,1,8.4), B= c(2.4,3,0.6,4.5), C = c(3,1,2.3,1.7), D = c(1.6,3.4,5,1.9), stringsAsFactors = FALSE)
Ram_Dat <- reactive({
data[[input$Input_Ram]][1]
})
Shyam_Dat <- reactive({
data[[input$Input_Shyam]][1]
})
GhanShyam_Dat <- reactive({
data[[input$Input_GhanShyam]][1]
})
MastRam_Dat <- reactive({
data[[input$Input_MastRam]][1]
})
output$values <- renderPrint({
paste0("Ram: ", Ram_Dat(), " Shyam: ", Shyam_Dat(), " GhanShyam: ", GhanShyam_Dat(), " MastRam: ", MastRam_Dat())
})
}
shinyApp(ui, server)