Got a column with 50 keywords:
Keyword1
Keyword2
Keyword3
KeywordN=50
In addition I got a data frame with two columns: Title and Abstract.
Title Abstract
Rstudio Keyword1 A interesting program language keyword2
Python Keyword3 A interesting program keyword3 language
I want to get an extra column (let's call it Keywords), where the keyword name will appear IF it is in the Title or Abstract, like this:
Title Abstract Keywords
Rstudio Keyword1 A interesting program language keyword2 Keyword1, keyword2
Python Keyword2 A interesting program keyword3 language Keyword2, Keyword3
The only thing how I could 'solve' this, was by making a binary columns (if a pattern matched). (grepl function), but that was not the desired solution...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…