dfmat <- dfm(tokens(data_corpus_inaugural))
# first 50 features (in original text order)
head(featnames(dfmat), 50)
# first 50 features alphabetically
head(sort(featnames(dfmat)), 50)
# contrast with descending total frequency order from topfeatures()
names(topfeatures(dfmat, 50))
Run the code above in your browser using DataLab