Been searching your forum for answers to my question witout results, the nearest I came was: subset data.frame union multiple intervals! But I don't see how that can help me. Maybe my reading comprehension in english being to weak.
So, I have a data frame study_a
containing 246 individuals, all given a specific code to entain anonymity. The code is one of 14 columns, the rest is answers on a questionnaire. An example:
"Code"
2
653
2678
3965
7342
4258
5245
My wish is to find those values outside the intervals 1-2999, 4251-4599 and 7000-7500 and in the end erase these rows (i.e individuals) since they are not supposed to be included in this study.
Except for the link I've also tried:
in.interval.lo(study_a$"code", 1, 2999) #in.interval.lo(x, lo, hi)
But this function don't seem to work for multiple intervals. And furthermore, I get an error message when I try to specify which columns values I want to check (since there are 13 columns in addition to "code").
Thanks in advance for your help, and if this question already have been solved I would be most thankful for a link to it since I've failed in finding it.