Thanks for this! Question: I have a df with a couple hundred variables. I want to keep all of the variables, but filter out the cases the don’t fall between two specific dates. Do I need to list every variable in the code? In your example, it looks like you’re selecting every variable (FL_DATE, CARRIER, ORIGIN, ORIGIN_CITY_NAME, ORIGIN_STATE_ABR, DEP_DELAY, DEP_TIME, ARR_DELAY, ARR_TIME).

flight %>%
select(FL_DATE, CARRIER, ORIGIN, ORIGIN_CITY_NAME, ORIGIN_STATE_ABR, DEP_DELAY, DEP_TIME, ARR_DELAY, ARR_TIME) %>%
filter(between(FL_DATE, as.Date("2014-01-05"), as.Date("2014-01-10")))

Is there something like a “select all variable” for the date filter for cases?

Thanks!

Policy Researcher / Emerge CA Alum / World Traveler / Mom / Founder parentinginpolitics.com / HuffPo Guest Writer / Let’s get more progressive women elected!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store