Hi everybody,
i am trying to do an app with shiny but i have a problem with if condition.
in input an user insert "spessore"
if this is 87.31 then it works, in output it gives me some information. If instead this is 87.16 then it doesn't give me information and in R I have this problem: Warning: Error in data.frame: object "thickness_fin" not found
1: shiny :: runApp
Warning: Error in renderText: object "thickness_fin" not found
96: renderText
95: func
82: renderFunc
81: output $ sentence
1: shiny :: runApp
To you a small excerpt:
if (spessore==87.16 || spessore==87.26 || spessore==87.31 || spessore==87.41 ||
spessore==87.66 || spessore==87.89 || spessore==87.99){
if(media>=1.25 && media<=1.5){
spessore_fin<-"Aggiungi 0.04"
}else if (media>=1.18 && media<1.25){
spessore_fin<-"Aggiungi 0.03"
}else if (media>=1.1 && media<1.18){
spessore_fin<-"Aggiungi 0.02"
}else if (media>=1 && media<1.1){
spessore_fin<-"Aggiungi 0.01"
}else if (media<=0.71){
spessore_fin<-"Riduci di 0.01"
}else {spessore_fin<-"Rimani invariato"}
}
To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at these resources, to see how to create one for a shiny app