mercredi 27 mars 2019

If condition will only run one condition in R

I am trying to run a if else statement and there is an error where it will only run one condition. The variables in question in my data set are the "away_odds" and "home_odds". In the photo examples, the away_odds will only run the "else condition", while the home_odds will only run the "if condition". How would I fix this so it will run both conditions based on the variable > 50 ?

Photo 1 - code

Photo 2 - Data set

Aucun commentaire:

Enregistrer un commentaire