I already created the box with the options, but I don't know how to make the graph change according to the selected column. I need that the y-axis be output$SelectTiempo
and the colour of the graphic be output$SelectProfesional
.
If you have some other advice that you think can help me, I really appreciate it.
output$Selectproce<-renderUI({
selectInput("Selectproce", "Seleccione Procedimiento",
BDnuevo$procedureCodes.0.name, multiple = T, selected = TRUE)
})
BD6.2<-reactive({
BDnuevo %>%
filter(procedureCodes.0.name %in% input$Selectproce)
})
output$SelectProfesional<-renderUI({
selectInput("SelectProfesional", "Seleccione perfil", choices = c("Inversionistas"="FullnameI" ,
"Deudores"="FullnameD",
"Autores"="FullnameA")
)
})
output$SelectTiempo <-renderUI({
selectInput("SelectTiempo", "Seleccione indicador",
choices = c( "TiempoR" = "RoomList",
"TiempoS"="SpacioTime"))
})
Fechasd<-reactive({
BD6.3<-BD6.2()
unique(BD6.3$simpleOriginDate)
})
output$RandeDated<-renderUI({
dateRangeInput('dateRange6',
label = 'Seleccione un rango',
start = min(Fechasd(),na.rm=T), max(Fechasd(),na.rm=T)
)
})
BD6.4<-reactive({
BD6.5<-BD6.2()
BD6.5 %>%
filter(simpleOriginDate >= input$dateRange6[1] & simpleOriginDate <= input$dateRange6[2])
})
output$lineplotTS <- renderPlot({
BD6.5<-BD6.4()
subset (BD6.5,BD6.5$times.simpleMinutesRecoverTime >=1 & BD6.5$times.simpleMinutesRecoverTime <= 1000)%>%
ggplot(aes(x = simpleOriginDate, y= , colour = ?????????????))+
geom_point()+
scale_x_date(date_breaks = "1 month", date_labels = "%b %Y")+
theme(axis.text.x=element_text(angle=45, hjust=1))
})
})