Suppose I have the following data frame:
Data1
X1 X2
1 15 1
2 3 1
3 7 0
4 11 1
5 1 0
6 9 0
7 18 0
8 6 1
9 3 1
I would like to know how to find the total number of observations where X1 is greater than 9 and X2 is equal to 1?
I think I will need to use sum(), but I have no idea what to put in the parenthesis.
1)
2)
3)