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
DocumentTermMatrix(docs, list(dictionary = Dictionary$Var1))
You could pre-defined the dictionary using the set tags
tdm.onlytags <- tdm[rownames(tdm)%in%TagSet$tag,]
to select only your specified words and next proceed with your analysis.