v <- c(2, 2, 4, 2, 4, 5, 6)
superadditivecheck(v, binary = TRUE, instance = TRUE)
# How to check if a game is subadditive:
v.sub <- c(40, 30, 50, 60, 70, 65, 90) # subadditive game
superadditivecheck(-v.sub)
Run the code above in your browser using DataLab