I am trying to select columns on multiple conditions: 1. I want to select specific columns but I also want to select variables with specific expressions in their name. I tried this:
df.waste <- w0%>%
select(council_name, Period, year | contains("households" | "Tonnage"))
So I am trying to select the columns "council_name", "Period", "year" AND all those which contain the expressions "household" OR "Tonnage" in their name.
I tried different things all similar to the one above but I'm not quite getting what I want. Thanks!
w0 %>% select(council_name, Period, year, contains(c("households", "Tonnage")))