I have two sets of data:
a set of tags (single words like php, html, etc)
php
html
a set of texts
I wish now
tdm.onlytags <- tdm[rownames(tdm)%in%TagSet$tag,]
to select only your specified words and next proceed with your analysis.