## Not run:
# use(polmineR.sampleCorpus)
# spd <- partition(
# "PLPRBTTXT", text_party="SPD", text_type="speech"
# )
# kauder <- partition(
# "PLPRBTTXT", text_name="Volker Kauder", pAttribute="word"
# )
# merkel <- partition(
# "PLPRBTTXT", text_name=".*Merkel",
# pAttribute="word", regex=TRUE
# )
# sAttributes(merkel, "text_date")
# sAttributes(merkel, "text_name")
# merkel <- partition(
# "PLPRBTTXT", text_name="Angela Dorothea Merkel",
# text_date="2009-11-10", text_type="speech", pAttribute="word"
# )
# merkel <- subset(merkel, !word %in% punctuation)
# merkel <- subset(merkel, !word %in% tm::stopwords("de"))
#
# # a certain defined time segment
# if (require("chron")){
# firstDay <- "2009-10-28"
# lastDay <- "2009-11-11"
# days <- strftime(
# chron::seq.dates(
# from = strftime(firstDay, format="%m/%d/%Y"),
# to = strftime(lastDay, format="%m/%d/%Y"),
# by="days"),
# format="%Y-%m-%d"
# )
# period <- partition("PLPRBTTXT", text_date=days)
# }
# ## End(Not run)
Run the code above in your browser using DataLab