I'm new to shiny and i don't know anything about html, I'm having an issue to find a way to get a slider and a numeric input at the same time for the same input value in my app. Also I would like that when i for instance set the numeric value to 25 the slider automatically sets itself to 25 once the button is pushed. Thank you for your help. I tried that for my ui but it doesn't work ...
library(shiny)
shinyUI(fluidPage(
numericInput(inputId = "num1",
label = "Jour limite",
value = 10, min = 1, max=500),
sliderInput(inputId = "num",
label= "Jour limite",
value= 10 ,min=1 ,max=500
),
actionButton(inputId="clicks",
label= "Actualiser"),
plotOutput("courbj")
))
Don't know if it's relevant but here is my server code :
print(getwd())
CourbeTot <- read.table("data/CourbeTot.csv",header=TRUE,sep=";")
shinyServer(
function(input,output) {
valeur <- eventReactive(input$clicks, {
(input$num)
})
output$courbj <- renderPlot({
plot(CourbeTot$DFSurvieTot.time,CourbeTot$DFSurvieTot.ProptionAuDelaDe,xlim=c(1,2*valeur()))
})
})