How to create a subset containing all variables and observations if criteria year is met

Hi there,

I currently am working on a dataset containing 76 variables and 150k observations.
Now I want to a create subset containing all the observations if the year in variable 'datadate' is 2005. Furthermore, I would like to add all variables in this subset.

Can anyone help me with what specific code to use?
Thank you in advance!

Yours sincerely,

Hi @tim19951! I'd recommend you look at chapter 5 of 'R for Data Science', and section 5.2 on the filter() function in particular, and post again if you run into any issues.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.