This is a follow up question to this
I have tried:
# Reactive expression to create data frame of all input values ----
sliderValues <- reactive({
data.frame(
Name = c(LETTERS[1:3]),
Value = paste0("input$", letters[1:3]),
stringsAsFactors = FALSE)
})
CodePudding user response:
One option would be to use sapply
or ...
# Reactive expression to create data frame of all input values ----
sliderValues <- reactive({
data.frame(
Name = c("A",
"B",
"C"),
Value = as.character(sapply(letters[1:3], function(x) input[[x]])),
stringsAsFactors = FALSE)
})