trying to count tournament profit per player. here\'s what the data looks like:
library(data.table) df <- data.table(\'player_1\' = c(10, 9, 5, 6, 7),