I got a document feature matrix from the quanteda package. The features are bigrams in this form word1_word2.
feature
1 good_morning
2 right_now
3 years_ago
4 last_night
5 r_u
6 ou_know
I would like to separate these bigrams into word1 in one column and word2 in another column, looking like this.
word1 word2
good morning
right now
years ago
last night
r u
ou know
The left of the underscore becomes word1, while the right of the underscore becomes word2. How do I do this in R?