I wish to select a set of rows from a data frame in R given multiple parameters. Normally this could be done using an OR statement, however the values are housed in an array. I am querying them as such (and with no luck):

Some data to get us rolling:

```
x = array(c(1,2,3),c(5,5))
y=c(1,2)

```

The command I'm presently using is (filtering by column 1):

```
x[x[,1] == y, ]

```

The above command yields this error:

```
Warning message:
In x[, i] == y :
  longer object length is not a multiple of shorter object length

```

Which makes sense. I just don't know how to get around it.

What I am looking for is:

```
     [,1] [,2] [,3] [,4] [,5]
[1,]    1    3    2    1    3
[2,]    2    1    3    2    1
[3,]    1    3    2    1    3
[4,]    2    1    3    2    1

```

Thanks in advance for the help!