jeudi 7 novembre 2019

Error: unexpected '}' in " }" during an if statement, and don't know where i'm wrong

the if cicle i want to create is really simple:

if (steamgroup$group_mean_dev = 0){
  steamgroup$group = 1
} else (steamgroup$group_mean_dev > 0) {
  steamgroup$group = 2
}

if (condition) give a specific value in a specific column but R says that: Error: unexpected '}' in "}"

Can someone help me to figure out why?

Aucun commentaire:

Enregistrer un commentaire