jeudi 30 janvier 2020

Any possible way to check for a condition without using any of control statements in R

if(x == y){
  text <- "string_1"
}else if(x < y){
  text <- "string_2"
}else if(x > y){
  text <- "string_3"
}

Is there any possible way that i could get rid of these clauses ? Can we use any mathematical operation to find out?

Aucun commentaire:

Enregistrer un commentaire