I'm looking to create a data frame that excludes columns that contain a certain set of letters in the text.
I do not want to remove the text from the column, but remove the entire column from my new data frame.
P_only_lab_data_HI <- HI_Wide2022 %>% select(contains("MGG"))
This code selects all of the columns that do contain "MGG", but I want the opposite of that for a table that excludes column names containing "MGG"
How do I say something like "Does not contain"?
Thank-you in advance