Reputation: 301
In R with a matrix:
m <- matrix(1:20, ncol = 4)
colnames(m) <- letters[1:4]
In the case I want to select just one value, it works. Like this,
subset(m, m[,4] == 17)
But if I want for example 3 values, I get an error. look at this:
subset(m, m[,4] == c(17,19,20,"|"))
any suggestion?
Upvotes: 2
Views: 236