I want a slider for quick, visual input, but also a corresponding numeric input for exact calculations. I've managed to tie the slider value
to input$
, so they will follow whatever is written in the numeric inputs. However, I can't seem to make it work the other way around.
ui
numericInput("num_l",
label = "Beam length in m.",
value = 10),
numericInput("num_a",
label = "Choose position, where to apply force, starting from left, in m.",
value = input$slider_a), # THIS DOESN'T WORK
numericInput("num_x",
label = "Calculate the deflection, at position starting from left, in m.",
value = input$slider_x), # NEITHER DOES THIS
server
output$slider <- renderUI({
tagList( # Need this for multiple reactive sliders
sliderInput("slider_a",
label = "Load force position:",
min = 0,
max = input$num_l,
value = input$num_a, # THIS WORKS
step = 0.1),
sliderInput("slider_x",
label = "Deflection calculation position:",
min = 0,
max = input$num_l,
value = input$num_x, # THIS ALSO WORKS
step = 0.1)
)
})