I have the following dataframe:
Ad Bd Ce
1 1 1
2 2 2
3 3 3
And i want to select columns that contains 'd' in the name (i don't want to use column indexes).
I thought about using grepl(), but don't know how to specify the 'x' argument:
new_data <- old_data[,which(grepl("d",x))]