I'm trying to find all variables names that end with "DE".
I'm already using this "grep" to find variables that start with "TR"
names(df )[ grep( "^(TR)" , names(df) ) ]
Is there a grep way to find the end pattern. Just an fyi, I know I can do it with "ends_with" but I'm trying to find a base r method.
names( df %>% select(ends_with( "DE" ) ) )
Thanks.