2 weeks ago
i want to subset my dataset by where multiple variables are equal to the number 1. I have been doing this by using the following code:
where group=1 or fish-=1 or net=1 or food=1;
I was wandering if there was a shorter way to write this, as it would be much longer if there were a lot of variables. i.e something along the lines of writing all the variables out and only having to write one '=1' in the code.
Need further help from the community? Please ask a new question.