I created two variables "score_diff" and "seed_diff", I would like to create a binary variable which is defined by if the score_diff is <0 and if the seed_diff is greater than 5.
df$score_diff <- df$score1- df$score2
df$seed_diff <- df$seed1- df$seed2
I tried this, however, it didn't work, I am new to this so bear with me:
df$upset <- ifelse(df$score_diff<0 & df$seed_diff>5)