I have a constraints and according to that constraints i am assigning segments to customers. But i want to change constraints in ui and calculate segments immediately in background. So here is my code.
shinyServer(function(input, output) {
Customer$Segment <- reactive({
onetimer <- input$onetimer
firstcons <- input$firstcons
secondcons <- input$secondcons
rental1 <- input$rental1
rental2 <- input$rental2
ifelse(Customer$Rentals < rental1 & Customer$TotalPayment <= firstcons, "One-Timer",
......)
output$result <- renderText({Customer$Segment})
Listening on http://127.0.0.1:6199 Warning: Error in rep: attempt to replicate an object of type 'closure' 49: $<-.data.frame 47: server [\srvfps281\belge\clm24522\Segmentasyon/server.R#15] Error in rep(value, length.out = nrows) : attempt to replicate an object of type 'closure'
How can i edit my data with shiny?