Error while running Shiny app

While running the Shiny App ,I am getting the below error ,
Warning in if (!is.na(attribValue)) { :
the condition has length > 1 and only the first element will be used
Warning: Error in writeImpl: Text to be written must be a length-one character vector
[No stack trace available]
Any fix for this?

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this resources, to see how to create one for a shiny app

This is not shiny related per se. consider this pure R script.

(a <- 8)
(b <- c(4,8))

if(a > 4){
  print("a>4")
} else {
  print("!a >4")
}

if(b > 4){
  print("b>4")
} else {
  print("!b >4")
}

ifelse(b>4,"b>4","!b>4")

I can't display the SliderInput after running the app. This is causing an error.

 output$ReactTimer <- renderUI({
    req(input$Match)
    sliderInput("Timer","Khel Kabaddi:",min = 1, value = max(data[data$MatchID == substr(input$Match, nchar(input$Match)-5,nchar(input$Match)),"RaidSequence"])*2,step=1,
                max = max(data[data$Period %in% c(1,2) & data$MatchID == substr(input$Match, nchar(input$Match)-5,nchar(input$Match)),"RaidSequence"])*2,
                animate = animationOptions(interval = 3000, loop = TRUE,
                                           playButton = icon('play', "fa-2x"),
                                           pauseButton = icon('pause', "fa-2x")))})

You should mention what the error is...
We can't run your code to see for ourselves. That in itself will limit our ability to give you help.

In my slider Input mentioned above, "value"&"max" have more conditions.
If I run my app in place of slider input it shows "Text to be written must be a length-one character vector"
error
Should I re write the conditions in the code of SliderInput?

I think thats probably the right thing to do.
Also learning how to reprex will benefit you in the long term and is worth doing also.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.