I'd like to subset rows where x1 and x2 == 9. My real set has over 200 columns where the column name starts with the same string. The dummy code below creates a smaller sample of the data. I'd like to do this ideally with the R data.table package if possible.

```
df <- data.frame('id'=c(1,2,3), 'x1'=c(9,9,4), 'x2'=c(9,9,4))
head(df)

# does not work, but thought perhaps I could have defined the columns via a paste and then subset where columns were equal to 9.
df[which(paste0("x", 1:2)==9), ]

```

Update: sorry if I wasn't clear. I am aware of simply adding a filter for `x1` and `x2`. The issue is that the real data consists of over 200 columns: `x1:x200`. I am in search of a cleaner solution than what is proposed below.