# NOT RUN {
period <- ifelse(docvars(data_corpus_inaugural, "Year") < 1945, "pre-war", "post-war")
mydfm <- dfm(data_corpus_inaugural, groups = period)
keyness <- textstat_keyness(mydfm)
textstat_select(keyness, 'america*')
# }
Run the code above in your browser using DataLab