I want to select the column(or make a subset) using the column name in a different dataframe.
e.g.
A dataframe: 3 columns
- each column name: ab, cd, de
B dataframe: 10 columns
- each column name: n_ab, n_cd_e, n_de, ab, fg, n_ef, tt, yy, zz, n_a2
I want to make the subset of the B dataframe.
subset C dataframe n_ab, n_cd_e, n_de, ab
subset D dataframe ab
How can I make C and D dataframe?
I expected that I could make the subset B using this code. but, I couldn't. Because the contains() only can make the subset by letter.
3) How can select the column(or make the subset) using the condition(like >= , %in% , == etc.)?
ge<-select(ge.n, contains('ge'))
Thanks