I have some people in my data who don't fulfill the requirements that were necessary to complete my survey (too old and too young). How do I exclude them from my data since I can't use theirs?
Asked
Active
Viewed 70 times
0
-
It's easier to help you if you provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. In general you would just `subset()` the data based on whatever criteria you want. – MrFlick Jul 19 '22 at 16:02
-
`library(dplyr) filter(data, age > x & age < y)` – dcsuka Jul 19 '22 at 16:49
1 Answers
0
library(dplyr)
Data <- Data %>%
filter(age > 15 & age < 100)
Ben

user438383
- 5,716
- 8
- 28
- 43

Benjamin Fretwurst
- 148
- 10