I am new to R, and have to do a regression on the dependent variable but only for a certain group which is characterized by one independent variable1 = 1 and another independent variable2 = 2.

So, the regression in question should only be done for the observations which comply with the criteria variable 1=1 and variable 2=2 instead of using all the observations.

The question is: How do I form a group of data which contains only the observations described in the above?

Hope this makes sense.

//Perav