Fetch and process Hillary Rodham Clinton's personal emails.
You can install rodham from github with:
# from CRAN
install.packages("rodham")
# dev version
devtools::install_github("JohnCoene/rodham")
# fetch emails
data(emails)
# build graph
edges <- edges_emails(emails)
g <- igraph::graph.data.frame(edges)
# plot
plot(g)
# get email content
ext <- get_xpdf()
# get emails related to Benghazi released in December
emails_bengh <- get_emails(release = "Benghazi", extractor = ext)
files <- list.files(emails_bengh) # list files
content <- lapply(1:length(files), function(x){
readLines(paste0(emails_bengh, "/", files[[x]]))
})
See vignette for more examples: devtools::build_vignettes()
See other projects at http://johncoene.github.io/projects/