I have a data frame and I want to make make subset( or select only those rows) which satisfy the multiple conditions, Ex...
a <-data.frame(a=c("a","a","b","c","b","d"),b=c(1,2,3,4,2,3))
> a
a b
1 a 1
2 a 2
3 b 3
4 c 4
5 b 2
6 d 3
I want to make subset where column a == a|b and column b = 2|3. Expected output
a b
1 a 2
2 b 3
3 b 2
I can do for one condition like
a[which(a[,"a"]=="a"),]
But is it possible to include all the multiple conditions in a single line?