I am trying to select people who are <=15 years old from a data set from NHANES 2013-2014. Help! Thank you
Would be good to add info to make your example reproducible, but something like this might work for you. Looking in the data, if you're referring to RIDAGEYR as the variable, then replace it with the "agevariable" below so it'd be:
library(tidyverse)
newdf <- yourdata %>%
select(variable1, variable2, agevariable) %>%
filter(agevariable <=15) %>%
arrange(agevariable)
head(newdf) #to check to see if it worked for you.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.