I am relatively new in R.
I have two dataframes, each of one variable only called final and cv.
final looks like:
V1
humans, aged, female, stroke
infant, male, echocardiography
aneurysm, adolescent, female, diabetes
pregnant, diabetes, female
cardiovascular diseases, complications
and cv looks like
V2
stroke
pregnant
echocardiography
aneurysm
diabetes
cardiovascular diseases
I want to manipulate final so that it only includes the text present in cv. This is what I want the resulting dataframe of final to look like:
V1
stroke
echocardiography
aneurysm, diabetes
pregnant, diabetes
cardiovascular diseases
Please advise. Thanks!