I would like to create another column (novig_new) which contains the value of the Pinnacle bookmaker's novig_prob subtracted from the other bookmakers for each team. Here is my tibble:
This is what I am looking to accomplish.
I would like to create another column (novig_new) which contains the value of the Pinnacle bookmaker's novig_prob subtracted from the other bookmakers for each team. Here is my tibble:
This is what I am looking to accomplish.
Perhaps, we may need
library(dplyr)
df1 %>%
group_by(team) %>%
mutate(novig_new = novig_prob - novig_prob[match("Pinnacle", bookmaker)]) %>%
ungroup