Greetings all,
I need help for an issue in shinyapps.io with else if statement.
This is my code :
req51<- data.frame(req5)
t<- nrow(req51)
x <- data.frame(classe=1:t, id=rep(1, t))
for (i in 1:t) {
if (req51[i,"Age"]<30) {x[i, "classe"] = "20-30"}
else if (req51[i,"Age"]<40) {x[i, "classe"] = "30-40"}
else if (req51[i,"Age"]<50) {x[i, "classe"] = "40-50"}
else {x[i, "classe"] = "50-60"}
}
When i run this locally it works well, but when i deploy the app on shinyapps.io i get the following error :
Warning: Error in if: missing value where TRUE/FALSE needed.
I dont really know what is going wrong.
Can somebody help please?
Thanks.
Sassire
...