I am trying to use this dplyr function to extract the columns from a dataframe if the variable contains AverageValue as part of the column name. For example “eosinophilsAverageValue, but I get he message: Error in select(., contains("AverageValue")) : unused argument (contains("AverageValue")). I do not understand what might be going on because I think I am using the correct expression. Could you please help me with this?
dfa <- df %>% select(contains("AverageValue"))
Thank you