Say I have the following dataframe

```
x <- c("p1","p2","p3","p4","p5","p6","p7","p8","p9","p10")
y <- c(1,4,3,5,5,7,2,2,6,8)
df <- data.frame(x,y)

```

say `x` represents players and `y` represents goals. I want all the subsets of players whose sum of goals is 10, say 

```
{p1,p3,p9},{p3,p6},{p7,p8,p9}...

```