Suppose I have a matrix with the values of the response variable as one column and 2 characteristics such as Gender and location, as the other two columns.
How to choose specific response values based on specific values of both gender and location?
For example, I know
dataset $ response [gender == "Male"]
will choose all the men. But I will say that I want to select response values from males that are from location == 'SE'. I do not know how to do that.
Thank you so much!
ps (I tried looking for it on the Internet, but it’s hard to find help for the operator [])
source
share