Basic logical analysis in R

#1
Hi all, I am new to R, but I need some help on this. I have two variables in a dataset
1. DIARRHOEA with responses 1=Y, 2=N
2. ORS 1= Y, 2=N
I want to get an analysis of ORS based on those who said Y=1 for question 1. How can I do this with R?

Andrew