Installing package githubinstall to use github to find rodham package
install.packages("githubinstall", repos = "http://cran.us.r-project.org")
##
## The downloaded binary packages are in
## /var/folders/px/jvyz6yhx3rxc5b6jqptnhg2r0000gn/T//RtmpkyOzs4/downloaded_packages
library(githubinstall)
githubinstall("rodham")
## Warning in fread(download_url, sep = "\t", header = FALSE, stringsAsFactors =
## FALSE, : Found and resolved improper quoting out-of-sample. First healed line
## 4848: <<Puriney honfleuR "Evening, honfleuR" by Seurat>>. If the fields are not
## quoted (e.g. field separator does not appear within any field), try quote="" to
## avoid this warning.
## Suggestion:
## - JohnCoene/rodham Fetch Hillary Rodham Clinton emails
## Do you want to install the package (Y/n)?
## Skipping install of 'rodham' from a github remote, the SHA1 (1ad6c5be) has not changed since last install.
## Use `force = TRUE` to force installation
force= TRUE
library(rodham)
Question 1: Write function to search the term cat in emails
searchcats<-function(subject= NULL){
returnedcats <-rodham::emails[grep(toupper(subject),rodham::emails$subject, ignore.case = T),]
return(returnedcats)
}
catdf<-searchcats(subject= "cat")
head(catdf)
## docID docDate to from
## 197 C05797236 2013-01-23 Hillary Clinton Philippe Reines
## 224 C05798258 2013-01-23 Huma Abedin Hillary Clinton
## 254 C05797200 2013-01-21 Hillary Clinton Cheryl Mills
## 967 C05796638 2012-11-30 Hillary Clinton Philip Gordon
## 1170 C05796804 2012-11-17 Jake Sullivan Hillary Clinton
## 1177 C05793900 2012-11-17 Hillary Clinton Sidney Blumenthal
## originalTo originalFrom
## 197 H Reines, Philippe I
## 224 Abedin, Huma H
## 254 H Mills, Cheryl D
## 967 H Gordon, Philip H
## 1170 sullivanjj@state.gov H
## 1177 H Blumenthal, Sidney
## subject
## 197 PTS RE CO-LOCATION
## 224 PTS RE CO-LOCATION
## 254 TANKS SURROUND MINISTRIES OF INFORMATION AND EDUCATION IN ERITREAN CAPITAL (SBU)
## 967 FROM CATHY ASHTON
## 1170 H: IGNATIUS LOCATES THE OCT SURPRISE, GETS IT RIGHT. SID
## 1177 H: IGNATIUS LOCATES THE OCT SURPRISE, GETS IT RIGHT. SID
## interesting not_interesting
## 197 <NA> <NA>
## 224 <NA> <NA>
## 254 <NA> <NA>
## 967 <NA> <NA>
## 1170 <NA> <NA>
## 1177 <NA> <NA>
str(catdf)
## 'data.frame': 123 obs. of 9 variables:
## $ docID : chr "C05797236" "C05798258" "C05797200" "C05796638" ...
## $ docDate : chr "2013-01-23" "2013-01-23" "2013-01-21" "2012-11-30" ...
## $ to : chr "Hillary Clinton" "Huma Abedin" "Hillary Clinton" "Hillary Clinton" ...
## $ from : chr "Philippe Reines" "Hillary Clinton" "Cheryl Mills" "Philip Gordon" ...
## $ originalTo : chr "H" "Abedin, Huma" "H" "H" ...
## $ originalFrom : chr "Reines, Philippe I" "H" "Mills, Cheryl D" "Gordon, Philip H" ...
## $ subject : chr "PTS RE CO-LOCATION" "PTS RE CO-LOCATION" "TANKS SURROUND MINISTRIES OF INFORMATION AND EDUCATION IN ERITREAN CAPITAL (SBU)" "FROM CATHY ASHTON" ...
## $ interesting : chr NA NA NA NA ...
## $ not_interesting: chr NA NA NA NA ...
catdf$docDate
## [1] "2013-01-23" "2013-01-23" "2013-01-21" "2012-11-30" "2012-11-17"
## [6] "2012-11-17" "2012-10-24" "2012-10-24" "2012-10-17" "2012-09-16"
## [11] "2012-09-16" "2012-06-17" "2012-05-04" "2012-04-19" "2012-04-17"
## [16] "2012-04-04" "2012-04-04" "2012-03-12" "2012-03-12" "2012-03-12"
## [21] "2012-03-12" "2012-03-11" "2012-02-13" "2012-02-04" "2012-02-03"
## [26] "2011-12-21" "2011-11-02" "2011-10-18" "2011-10-16" "2011-10-16"
## [31] "2011-10-15" "2011-09-24" "2011-09-23" "2011-09-18" "2011-09-15"
## [36] "2011-09-14" "2011-09-12" "2011-08-25" "2011-08-25" "2011-08-25"
## [41] "2011-08-25" "2011-08-25" "2011-08-17" "2011-08-16" "2011-08-04"
## [46] "2011-08-04" "2011-08-04" "2011-07-11" "2011-07-03" "2011-06-29"
## [51] "2011-04-28" "2011-04-28" "2011-04-08" "2011-04-05" "2011-02-21"
## [56] "2011-02-21" "2011-01-28" "2011-01-15" "2011-01-12" "2011-01-10"
## [61] "2010-12-07" "2010-12-07" "2010-12-07" "2010-11-18" "2010-11-13"
## [66] "2010-10-13" "2010-10-05" "2010-10-05" "2010-09-17" "2010-08-27"
## [71] "2010-08-27" "2010-08-16" "2010-08-16" "2010-08-15" "2010-07-19"
## [76] "2010-07-17" "2010-07-03" "2010-07-03" "2010-07-02" "2010-06-30"
## [81] "2010-06-15" "2010-06-15" "2010-06-14" "2010-06-11" "2010-06-06"
## [86] "2010-05-08" "2010-05-08" "2010-05-06" "2010-05-06" "2010-04-22"
## [91] "2010-03-28" "2010-03-23" "2010-03-18" "2010-03-11" "2010-03-10"
## [96] "2010-03-07" "2010-03-07" "2010-03-03" "2010-02-01" "2010-01-22"
## [101] "2010-01-22" "2010-01-21" "2010-01-19" "2010-01-19" "2010-01-19"
## [106] "2009-11-27" "2009-11-27" "2009-11-15" "2009-11-02" "2009-11-02"
## [111] "2009-10-07" "2009-08-05" "2009-08-05" "2009-08-02" "2009-08-01"
## [116] "2009-07-12" "2009-07-12" "2009-05-28" "2009-05-22" "2009-05-15"
## [121] NA NA NA
class(catdf$docDate)
## [1] "character"
catdf$docDate<- as.Date(catdf$docDate, format= "%Y-%m-%d")
class(catdf$docDate)
## [1] "Date"
str(catdf)
## 'data.frame': 123 obs. of 9 variables:
## $ docID : chr "C05797236" "C05798258" "C05797200" "C05796638" ...
## $ docDate : Date, format: "2013-01-23" "2013-01-23" ...
## $ to : chr "Hillary Clinton" "Huma Abedin" "Hillary Clinton" "Hillary Clinton" ...
## $ from : chr "Philippe Reines" "Hillary Clinton" "Cheryl Mills" "Philip Gordon" ...
## $ originalTo : chr "H" "Abedin, Huma" "H" "H" ...
## $ originalFrom : chr "Reines, Philippe I" "H" "Mills, Cheryl D" "Gordon, Philip H" ...
## $ subject : chr "PTS RE CO-LOCATION" "PTS RE CO-LOCATION" "TANKS SURROUND MINISTRIES OF INFORMATION AND EDUCATION IN ERITREAN CAPITAL (SBU)" "FROM CATHY ASHTON" ...
## $ interesting : chr NA NA NA NA ...
## $ not_interesting: chr NA NA NA NA ...
na.omit(catdf$docDate)
## [1] "2013-01-23" "2013-01-23" "2013-01-21" "2012-11-30" "2012-11-17"
## [6] "2012-11-17" "2012-10-24" "2012-10-24" "2012-10-17" "2012-09-16"
## [11] "2012-09-16" "2012-06-17" "2012-05-04" "2012-04-19" "2012-04-17"
## [16] "2012-04-04" "2012-04-04" "2012-03-12" "2012-03-12" "2012-03-12"
## [21] "2012-03-12" "2012-03-11" "2012-02-13" "2012-02-04" "2012-02-03"
## [26] "2011-12-21" "2011-11-02" "2011-10-18" "2011-10-16" "2011-10-16"
## [31] "2011-10-15" "2011-09-24" "2011-09-23" "2011-09-18" "2011-09-15"
## [36] "2011-09-14" "2011-09-12" "2011-08-25" "2011-08-25" "2011-08-25"
## [41] "2011-08-25" "2011-08-25" "2011-08-17" "2011-08-16" "2011-08-04"
## [46] "2011-08-04" "2011-08-04" "2011-07-11" "2011-07-03" "2011-06-29"
## [51] "2011-04-28" "2011-04-28" "2011-04-08" "2011-04-05" "2011-02-21"
## [56] "2011-02-21" "2011-01-28" "2011-01-15" "2011-01-12" "2011-01-10"
## [61] "2010-12-07" "2010-12-07" "2010-12-07" "2010-11-18" "2010-11-13"
## [66] "2010-10-13" "2010-10-05" "2010-10-05" "2010-09-17" "2010-08-27"
## [71] "2010-08-27" "2010-08-16" "2010-08-16" "2010-08-15" "2010-07-19"
## [76] "2010-07-17" "2010-07-03" "2010-07-03" "2010-07-02" "2010-06-30"
## [81] "2010-06-15" "2010-06-15" "2010-06-14" "2010-06-11" "2010-06-06"
## [86] "2010-05-08" "2010-05-08" "2010-05-06" "2010-05-06" "2010-04-22"
## [91] "2010-03-28" "2010-03-23" "2010-03-18" "2010-03-11" "2010-03-10"
## [96] "2010-03-07" "2010-03-07" "2010-03-03" "2010-02-01" "2010-01-22"
## [101] "2010-01-22" "2010-01-21" "2010-01-19" "2010-01-19" "2010-01-19"
## [106] "2009-11-27" "2009-11-27" "2009-11-15" "2009-11-02" "2009-11-02"
## [111] "2009-10-07" "2009-08-05" "2009-08-05" "2009-08-02" "2009-08-01"
## [116] "2009-07-12" "2009-07-12" "2009-05-28" "2009-05-22" "2009-05-15"
str(catdf)
## 'data.frame': 123 obs. of 9 variables:
## $ docID : chr "C05797236" "C05798258" "C05797200" "C05796638" ...
## $ docDate : Date, format: "2013-01-23" "2013-01-23" ...
## $ to : chr "Hillary Clinton" "Huma Abedin" "Hillary Clinton" "Hillary Clinton" ...
## $ from : chr "Philippe Reines" "Hillary Clinton" "Cheryl Mills" "Philip Gordon" ...
## $ originalTo : chr "H" "Abedin, Huma" "H" "H" ...
## $ originalFrom : chr "Reines, Philippe I" "H" "Mills, Cheryl D" "Gordon, Philip H" ...
## $ subject : chr "PTS RE CO-LOCATION" "PTS RE CO-LOCATION" "TANKS SURROUND MINISTRIES OF INFORMATION AND EDUCATION IN ERITREAN CAPITAL (SBU)" "FROM CATHY ASHTON" ...
## $ interesting : chr NA NA NA NA ...
## $ not_interesting: chr NA NA NA NA ...
library(plyr)
freqcatdf<-ddply(catdf, .(subject), mutate, freq.sub = length(subject))
head(freqcatdf)
## docID docDate to from
## 1 C05768609 2010-04-22 Hillary Clinton Huma Abedin
## 2 C05788789 2011-09-18 Monica Hanley Hillary Clinton
## 3 C05782503 2011-09-15 Hillary Clinton Cheryl Mills
## 4 C05776201 2010-08-16 Anne-Marie Slaughter Hillary Clinton
## 5 C05776204 2010-08-16 Lauren Jiloty Hillary Clinton
## 6 C05771023 2010-08-15 Hillary Clinton Anne-Marie Slaughter
## originalTo originalFrom
## 1 H Abedin, Huma
## 2 monica.hanley hrod17@clintonemail.com
## 3 H Mills, Cheryl D
## 4 slaughtera@state.gov H
## 5 JilotyLC@state.gov H
## 6 H Slaughter, Anne-Marie
## subject
## 1 (REUTERS) ARMENIA COALITION HALTS RATIFICATION OF TURKEY DEAL
## 2 27, 255 PEOPLE CALL FOR CLINTON TO TAKE LEAD ON CONGO CERTIFICATION
## 3 27,255 PEOPLE CALL FOR CLINTON TO TAKE LEAD ON CONGO CERTIFICATION
## 4 A BILAT W/ CATHY ASHTON ON DC
## 5 A BILAT W/ CATHY ASHTON ON DC
## 6 A BILAT W/ CATHY ASHTON ON DC
## interesting not_interesting freq.sub
## 1 <NA> <NA> 1
## 2 <NA> <NA> 1
## 3 <NA> <NA> 1
## 4 <NA> <NA> 3
## 5 <NA> <NA> 3
## 6 <NA> <NA> 3
cats_ts<-ts(freqcatdf$freq.sub, start=4/22/10, delta=10)
plot(cats_ts)
Writing the function to plot after plotting it without..
plotcats<- function(freqcatdf){
cats4plots<- ts(freqcatdf$freq.sub, start=4/22/10, deltat = 10)
catplotfxn<-plot(cats4plots)
return(catplotfxn)
}
plotcats(freqcatdf)
## NULL
library(data.table)
tablefrom<-table(emails$from)
tablefrom
##
##
## 461
## 111th Congress
## 1
## 112th Congress
## 1
## Adam Ereli
## 1
## Adam Keith
## 1
## Adam Szubin
## 1
## AGNA USEMB Kabul Afghanistan
## 1
## AHLC Chair
## 1
## Ahmet Davutoglu
## 1
## Akbar Zaidi
## 1
## alcb
## 5
## Alec
## 1
## Alec Ross
## 8
## Alex Dupuy
## 1
## Alex Thier
## 1
## Alice Wells
## 2
## Allison Stanger
## 1
## Alston Ramsay
## 1
## AM
## 1
## AmEMB Port-au-Prince
## 2
## American Beverage Association
## 1
## Amnesty International
## 1
## Andrea Palm
## 3
## Andrew Bernknopf
## 2
## Andrew Mayock
## 1
## Andrew Shapiro
## 11
## Angel Gurria
## 1
## Ann Stock
## 7
## Anne Patterson
## 1
## Anne Wang
## 1
## Anne-Marie Slaughter
## 377
## Anthony Lake
## 2
## AP
## 1
## Arazi Cooks
## 1
## Arthur Humphries
## 1
## Arturo Valenzuela
## 16
## Ashley Bommer
## 1
## Barack Obama
## 6
## Barbara Mikulski
## 34
## Benjamin Netanyahu
## 2
## Bernadette Meehan
## 9
## Betsy Ebeling
## 55
## Bill Lane
## 1
## Binyam Mohamed
## 2
## Brian Atwood
## 2
## Bridget Davis
## 1
## Brooke Garber Neidich
## 1
## Bruce Blair
## 1
## Bruce Ramer
## 2
## Burns Strider
## 7
## C H McHone
## 1
## Capricia Marshall
## 72
## Carlos Pascual
## 3
## Carlyn Reichel
## 1
## Caroline Adler
## 7
## Case Button
## 1
## Catherine Ashton
## 1
## Catherine Graham
## 1
## Cecile Richards
## 1
## Chad Weston
## 1
## Charles Kiamie
## 3
## Chelsea Clinton
## 2
## Cherie Blair
## 28
## Cheryl Mills
## 5121
## Chester Crocker
## 1
## Child Mind Institute
## 1
## Chris Jennings
## 1
## Christina Agor
## 1
## Christine Falvo
## 1
## Christopher Butzgy
## 1
## Christopher Green
## 1
## Christopher Hill
## 1
## Cindy Hickey
## 2
## Claire Coleman
## 294
## Colin Powell
## 1
## Courtney Beale
## 3
## Craig Kelly
## 5
## Daily Sun
## 2
## Dan Feldman
## 1
## Dana Hyde
## 1
## Daniel Baer
## 8
## Daniel Feldman
## 1
## Daniel Fried
## 1
## Daniel Inonye
## 1
## Daniel Poneman
## 1
## Daniel Ross
## 1
## Daniel Runde
## 1
## Daniel Schwerin
## 24
## Daniel Shapiro
## 3
## Daniel Smith
## 2
## Danielle Brian
## 2
## David Adams
## 30
## David Axelrod
## 2
## David Brock
## 2
## David Garten
## 1
## David Hale
## 6
## David Johnson
## 2
## David Miliband
## 2
## Denis McDonough
## 1
## Dennis Ross
## 43
## Derek Chollet
## 1
## Derek Mitchell
## 1
## Diane Reynolds
## 6
## Director of Communication, ISAF and USFOR-A
## 1
## Dmitry Vovchuk
## 1
## DSA
## 1
## E. Pelton
## 1
## Ed Shin
## 1
## Elizabeth Dibble
## 2
## Elizabeth Drew
## 1
## Elle Magazine
## 1
## Ellen Tauscher
## 11
## Embassy of the Argentine Republic
## 2
## Eni Faleomavaega
## 1
## Eric Goosby; Tom Frieden; Lois Quam; Rajiv Shah
## 2
## Eric Schwartz
## 1
## Eric Woodard
## 2
## Esther Brimmer
## 2
## Farideh Kamali
## 1
## Fay Hartog Levin
## 1
## FICC
## 1
## FINCA International
## 1
## Foreign Affairs Magazine
## 1
## Francis Ricciardone
## 1
## G Sheaffer
## 1
## G Wills
## 1
## G. Lou de Bac
## 1
## G. Wills
## 2
## Gary Gensler
## 10
## Gene Cretz
## 1
## Geoffrey Keating
## 1
## George Mitchell
## 7
## Gerald Seib
## 1
## Gideon Rose
## 1
## Gina Glantz
## 3
## Gorden Gray
## 1
## Graca Machel Trust
## 1
## Gregory Slayton
## 1
## Haiti
## 5
## Harold Hongju Koh
## 73
## Harold Koh
## 4
## Heintz
## 1
## Henry Kissinger
## 1
## Hillary Clinton
## 8274
## Hillary Clinton; Cheryl Mills
## 1
## Howard Gutman
## 1
## Howard Stringer
## 2
## Huma Abedin
## 3880
## Ian Kelly
## 1
## International Criminal Court
## 1
## Izumi Cintron
## 1
## J. Finkle
## 1
## Jackie Newmyer
## 16
## Jacob Lew
## 62
## Jake
## 1
## Jake Sullivan
## 4683
## JAMA
## 2
## James Jeffrey
## 1
## James McGovern
## 2
## James Rubin
## 7
## James Smith
## 1
## James Steinberg
## 14
## Jamie
## 1
## Jamie Radice
## 1
## Janet Napolitano
## 2
## Jay Epping
## 1
## Jeffrey Farrow
## 17
## Jeffrey Feltman
## 57
## Jennifer Davis
## 3
## Jennifer Golden
## 1
## Jill Iscol
## 2
## Jim Hoagland
## 1
## JLCOS
## 1
## Joanne Laszczych
## 10
## Joe Wilson
## 7
## Joelle-Elizabeth Bastien
## 1
## John Kerry
## 12
## John Podesta
## 4
## John Spykerman
## 1
## Johnnie Carson
## 20
## Johnson Toribiong
## 2
## Jon Kyl
## 1
## Jonathan Prince
## 1
## Jose Fernandez; Roberta Jacobson
## 1
## Joseph Macmanus
## 5
## Josh Blumenfeld
## 1
## Joshua Daniel
## 16
## Judith Kieffer
## 1
## Judith McHale
## 247
## Judson Lantz
## 1
## Julie Short
## 1
## Justine Sincavage
## 1
## Karen Stewart
## 1
## Kelly Brownell
## 3
## Kimberly Lang
## 1
## KPK
## 1
## Kris Balderston
## 66
## Kurt Campbell
## 104
## L. Rosenberger
## 1
## Lanny Davis
## 7
## latimes.com
## 1
## Laura Pena
## 4
## Laura Tyson
## 1
## Lauren Jiloty
## 789
## Laurie Rubiner
## 1
## Lee Brown
## 2
## Lee Feinstein
## 1
## Linda Dewan
## 1
## Lissa Muscatine
## 100
## Liz Sherwood-Randall
## 2
## Lois Quam
## 6
## Lona Valmoro
## 513
## Long Term Strategy Group
## 1
## Louise Diamond
## 2
## Lucy Jarvis
## 2
## Luis CdeBaca
## 1
## Lynne Hybels
## 1
## Mack McLarty
## 4
## Madeleine Albright
## 2
## Madeleine Albright
## 16
## Manouchehr Mottaki
## 1
## ManTech
## 1
## Marc Grossman
## 1
## Marc Nathanson
## 1
## Margaret Carpenter
## 3
## Maria Calivis
## 2
## Maria Otero
## 23
## Maria Sand
## 2
## Marianne Scott
## 1
## Mark Penn
## 1
## Mark Pinsky
## 1
## Martin Indyk
## 1
## Maura Pally
## 2
## Max Baucus
## 1
## Megan Rooney
## 17
## Melanne Verveer
## 306
## Michael Froman
## 2
## Michael Fuchs
## 32
## Michael Hammer
## 1
## Michael Kirby
## 2
## Michael McFaul
## 1
## Michael Posner
## 3
## Michele Flournoy
## 2
## Miguel Rodriguez
## 43
## Mike
## 2
## Mike Lynch
## 1
## Mike Mullen
## 3
## Ministry of Foreign Affairs of the Islamic Republic of Pakistan
## 1
## Ministry of Foreign Affairs Pakistan
## 1
## Mission of the Islamic Republic of Iran
## 1
## Monica Hanley
## 605
## Muhammad Yunus
## 9
## Neera Tanden
## 77
## Nelson Peltz
## 1
## New York State DMV
## 5
## New York Times
## 3
## NewsTickers
## 1
## NHLA
## 1
## Nicholas Norman
## 1
## Nicolas Sarkozy
## 1
## Nicole Avant
## 1
## Nima Abbaszadeh
## 6
## Nora Toiv
## 18
## Nora Tov
## 1
## Not provided by State Department
## 6
## Opinion Research
## 1
## Oscar Arias Sanchez
## 1
## Oscar Flores
## 1
## Parnian Nazary
## 3
## Patrick Kennedy
## 20
## Paul
## 1
## Paul Collier
## 1
## Paul Jones
## 3
## Payton Knopf
## 1
## Philip Crowley
## 23
## Philip Gordon
## 50
## Philippe Reines
## 387
## Phillip Crowley
## 5
## Piper Campbell
## 1
## postmaster@state.gov
## 10
## Prime Minister
## 1
## PVervee
## 1
## R.A. Brubaker
## 1
## Rachel Kleinfeld
## 1
## Rahm Emanuel
## 6
## Rajiv Shah
## 15
## Ralph Alexander
## 1
## Ramiro Lopes da Silva
## 1
## Rana Foroohar
## 1
## Recos
## 18
## Regina Deanehan
## 2
## Reines Philippe
## 1
## Rendon Group
## 1
## Reta Jo Lewis
## 2
## Richard Holbrooke
## 1
## Richard Morningstar
## 1
## Richard Verma
## 176
## Rob Fallon
## 1
## Robert Blake
## 7
## Robert Danford
## 1
## Robert Einhorn
## 1
## Robert Gates
## 4
## Robert Hormats
## 13
## Robert Hunter
## 1
## Robert Kagan
## 2
## Robert Mueller, III
## 1
## Robert Russo
## 155
## Roberta Jacobson
## 2
## rooneym@state.gov
## 1
## Ryan Crocker
## 1
## S. Akbar Zaidi
## 1
## S/CIEA:Pascual; S/EEE Morningstar
## 1
## Saeed Jalili
## 1
## Samuel ("Sandy") Berger
## 16
## Sarah Debbink
## 1
## Sarah Teich
## 1
## Sheldon Whitehouse
## 2
## Shilpa Pesaru
## 1
## Sidney Blumenthal
## 869
## Sig Hecker
## 2
## Sinirlioglu Feridun
## 1
## SRGIA
## 1
## STATE
## 17
## Stephen Heintz
## 4
## Steve Bondy
## 1
## Steven Chu
## 3
## Strobe Talbott
## 69
## SUPREME ALLIED COMMANDER EUROPE
## 1
## Susan Rice
## 11
## Syrian Support Group
## 2
## T Lenderking
## 1
## T.M. Franklin Cownie
## 1
## Thomas Buda
## 1
## Thomas Countryman
## 1
## Thomas Donilon
## 36
## Thomas Nides
## 63
## Thomas Shannon
## 2
## Todd Stern
## 7
## Tomicah Tillemann
## 11
## Tony Blair
## 34
## Tsakina Elbegdori
## 1
## U.S. Department of Homeland Security
## 2
## U.S. Global Leadership Coalition
## 1
## UN General Assembly
## 2
## USUN
## 3
## Valerie Wilson
## 2
## Victoria Nuland
## 2
## Voda Ebeling
## 4
## Wall Street Journal
## 1
## Walter Parrs
## 1
## Washington Post
## 4
## Wendy Sherman
## 145
## Werner Ilic
## 1
## White House
## 1
## William Burns
## 75
## World Bank
## 8
## www.oecd.org
## 1
## Yasar Yakis
## 1
## Zachary Iscol
## 1
fromfreq<-as.data.frame(tablefrom)
head(fromfreq)
## Var1 Freq
## 1 461
## 2 111th Congress 1
## 3 112th Congress 1
## 4 Adam Ereli 1
## 5 Adam Keith 1
## 6 Adam Szubin 1
colnames(fromfreq)[1]<-"sender"
colnames(fromfreq)[2]<-"number sent from sender"
head(fromfreq)
## sender number sent from sender
## 1 461
## 2 111th Congress 1
## 3 112th Congress 1
## 4 Adam Ereli 1
## 5 Adam Keith 1
## 6 Adam Szubin 1
head(sort(fromfreq$Freq,decreasing=TRUE),n=5)
## NULL
tabledate<-table(emails$docDate)
tabledate
##
## 0000-00-00 1995-03-02 1996-03-27 2003-08-27 2006-02-15 2007-09-17 2008-04-30
## 4 2 2 1 1 2 1
## 2008-05-01 2008-06-15 2009-01-04 2009-01-06 2009-01-12 2009-01-15 2009-01-26
## 1 1 1 1 1 1 1
## 2009-03-18 2009-03-19 2009-03-20 2009-03-21 2009-03-23 2009-03-24 2009-03-25
## 1 2 6 6 3 1 16
## 2009-03-26 2009-03-27 2009-03-28 2009-03-29 2009-03-30 2009-03-31 2009-04-01
## 7 4 5 8 7 10 12
## 2009-04-02 2009-04-03 2009-04-04 2009-04-05 2009-04-06 2009-04-07 2009-04-08
## 7 6 3 4 12 3 8
## 2009-04-09 2009-04-10 2009-04-11 2009-04-12 2009-04-13 2009-04-14 2009-04-15
## 4 13 10 7 11 14 5
## 2009-04-16 2009-04-17 2009-04-18 2009-04-19 2009-04-20 2009-04-21 2009-04-22
## 8 5 2 4 3 33 2
## 2009-04-23 2009-04-24 2009-04-25 2009-04-26 2009-04-27 2009-04-28 2009-04-29
## 4 11 7 9 8 16 16
## 2009-04-30 2009-05-01 2009-05-02 2009-05-03 2009-05-04 2009-05-05 2009-05-06
## 7 13 21 13 31 12 14
## 2009-05-07 2009-05-08 2009-05-09 2009-05-10 2009-05-11 2009-05-12 2009-05-13
## 17 14 18 8 8 6 19
## 2009-05-14 2009-05-15 2009-05-16 2009-05-17 2009-05-18 2009-05-19 2009-05-20
## 24 6 21 11 26 4 22
## 2009-05-21 2009-05-22 2009-05-23 2009-05-24 2009-05-25 2009-05-26 2009-05-27
## 15 15 19 6 33 22 24
## 2009-05-28 2009-05-29 2009-05-30 2009-05-31 2009-06-01 2009-06-02 2009-06-03
## 17 21 26 11 13 20 22
## 2009-06-04 2009-06-05 2009-06-06 2009-06-07 2009-06-08 2009-06-09 2009-06-10
## 13 27 17 9 19 23 9
## 2009-06-11 2009-06-12 2009-06-13 2009-06-14 2009-06-15 2009-06-16 2009-06-17
## 29 20 17 23 8 38 9
## 2009-06-18 2009-06-19 2009-06-20 2009-06-21 2009-06-22 2009-06-23 2009-06-25
## 8 8 7 1 8 16 18
## 2009-06-26 2009-06-27 2009-06-28 2009-06-29 2009-06-30 2009-07-01 2009-07-02
## 6 9 25 14 11 10 44
## 2009-07-03 2009-07-04 2009-07-05 2009-07-06 2009-07-07 2009-07-08 2009-07-09
## 13 16 17 25 6 2 16
## 2009-07-10 2009-07-11 2009-07-12 2009-07-13 2009-07-14 2009-07-15 2009-07-16
## 11 24 21 2 50 21 23
## 2009-07-17 2009-07-19 2009-07-21 2009-07-22 2009-07-24 2009-07-25 2009-07-26
## 8 6 7 6 11 34 40
## 2009-07-27 2009-07-28 2009-07-29 2009-07-30 2009-07-31 2009-08-01 2009-08-02
## 4 5 4 1 28 27 29
## 2009-08-03 2009-08-04 2009-08-05 2009-08-06 2009-08-07 2009-08-08 2009-08-09
## 8 8 13 7 23 2 2
## 2009-08-10 2009-08-11 2009-08-12 2009-08-13 2009-08-14 2009-08-15 2009-08-16
## 7 7 7 10 13 32 39
## 2009-08-17 2009-08-18 2009-08-19 2009-08-20 2009-08-21 2009-08-22 2009-08-23
## 5 14 29 10 49 21 8
## 2009-08-24 2009-08-25 2009-08-26 2009-08-27 2009-08-28 2009-08-29 2009-08-30
## 39 28 46 14 37 53 34
## 2009-08-31 2009-09-01 2009-09-02 2009-09-03 2009-09-04 2009-09-05 2009-09-06
## 21 50 25 21 15 19 21
## 2009-09-07 2009-09-08 2009-09-09 2009-09-10 2009-09-11 2009-09-12 2009-09-13
## 32 30 19 19 16 40 18
## 2009-09-14 2009-09-15 2009-09-16 2009-09-17 2009-09-18 2009-09-19 2009-09-20
## 9 32 27 29 22 19 62
## 2009-09-21 2009-09-22 2009-09-23 2009-09-24 2009-09-25 2009-09-26 2009-09-27
## 35 24 34 26 6 7 21
## 2009-09-28 2009-09-29 2009-09-30 2009-10-01 2009-10-02 2009-10-03 2009-10-04
## 18 42 38 11 10 48 40
## 2009-10-05 2009-10-06 2009-10-07 2009-10-08 2009-10-09 2009-10-10 2009-10-11
## 7 17 12 22 7 30 14
## 2009-10-12 2009-10-13 2009-10-14 2009-10-15 2009-10-16 2009-10-17 2009-10-18
## 12 2 8 18 22 35 53
## 2009-10-19 2009-10-20 2009-10-21 2009-10-22 2009-10-23 2009-10-24 2009-10-25
## 25 22 17 13 17 31 33
## 2009-10-26 2009-10-27 2009-10-28 2009-10-29 2009-10-30 2009-10-31 2009-11-01
## 21 6 19 18 20 13 9
## 2009-11-02 2009-11-03 2009-11-04 2009-11-05 2009-11-06 2009-11-07 2009-11-08
## 33 9 14 46 20 41 13
## 2009-11-09 2009-11-10 2009-11-11 2009-11-12 2009-11-13 2009-11-14 2009-11-15
## 10 37 12 17 22 14 22
## 2009-11-16 2009-11-17 2009-11-18 2009-11-19 2009-11-20 2009-11-21 2009-11-22
## 9 15 10 9 8 28 19
## 2009-11-23 2009-11-24 2009-11-25 2009-11-26 2009-11-27 2009-11-28 2009-11-29
## 12 13 47 41 26 11 55
## 2009-11-30 2009-12-01 2009-12-02 2009-12-03 2009-12-04 2009-12-05 2009-12-06
## 11 10 31 12 7 15 19
## 2009-12-07 2009-12-08 2009-12-09 2009-12-10 2009-12-11 2009-12-12 2009-12-13
## 12 25 7 9 36 34 52
## 2009-12-14 2009-12-15 2009-12-16 2009-12-17 2009-12-18 2009-12-19 2009-12-20
## 16 18 26 12 3 19 32
## 2009-12-21 2009-12-22 2009-12-23 2009-12-24 2009-12-25 2009-12-26 2009-12-27
## 7 43 67 62 14 13 5
## 2009-12-28 2009-12-29 2009-12-30 2009-12-31 2010-01-01 2010-01-02 2010-01-03
## 19 51 15 24 13 11 45
## 2010-01-04 2010-01-05 2010-01-06 2010-01-07 2010-01-08 2010-01-09 2010-01-10
## 7 15 8 32 4 27 22
## 2010-01-11 2010-01-12 2010-01-13 2010-01-14 2010-01-15 2010-01-16 2010-01-17
## 21 22 22 37 28 5 90
## 2010-01-18 2010-01-19 2010-01-20 2010-01-21 2010-01-22 2010-01-23 2010-01-24
## 57 34 35 48 39 33 81
## 2010-01-25 2010-01-26 2010-01-27 2010-01-28 2010-01-29 2010-01-30 2010-01-31
## 27 29 17 22 13 37 52
## 2010-02-01 2010-02-02 2010-02-03 2010-02-04 2010-02-05 2010-02-06 2010-02-07
## 24 11 28 33 48 46 15
## 2010-02-08 2010-02-09 2010-02-10 2010-02-11 2010-02-12 2010-02-13 2010-02-14
## 56 37 62 35 24 37 3
## 2010-02-15 2010-02-16 2010-02-17 2010-02-18 2010-02-19 2010-02-20 2010-02-21
## 8 4 23 14 16 15 45
## 2010-02-22 2010-02-23 2010-02-24 2010-02-25 2010-02-26 2010-02-27 2010-02-28
## 21 16 22 18 16 18 26
## 2010-03-01 2010-03-02 2010-03-03 2010-03-04 2010-03-05 2010-03-06 2010-03-07
## 10 18 19 30 27 46 21
## 2010-03-08 2010-03-09 2010-03-10 2010-03-11 2010-03-12 2010-03-13 2010-03-14
## 15 16 12 23 17 18 32
## 2010-03-15 2010-03-16 2010-03-17 2010-03-18 2010-03-19 2010-03-20 2010-03-21
## 10 16 10 5 4 18 70
## 2010-03-22 2010-03-23 2010-03-24 2010-03-25 2010-03-26 2010-03-27 2010-03-28
## 33 15 21 18 31 9 15
## 2010-03-29 2010-03-30 2010-03-31 2010-04-01 2010-04-02 2010-04-03 2010-04-04
## 13 10 29 30 23 25 24
## 2010-04-05 2010-04-06 2010-04-07 2010-04-08 2010-04-09 2010-04-10 2010-04-11
## 18 18 14 15 15 23 9
## 2010-04-12 2010-04-13 2010-04-14 2010-04-15 2010-04-16 2010-04-17 2010-04-18
## 8 10 6 10 7 16 13
## 2010-04-19 2010-04-20 2010-04-21 2010-04-22 2010-04-23 2010-04-24 2010-04-25
## 27 27 16 26 15 33 31
## 2010-04-26 2010-04-27 2010-04-28 2010-04-29 2010-04-30 2010-05-01 2010-05-02
## 20 8 6 12 34 10 28
## 2010-05-03 2010-05-04 2010-05-05 2010-05-06 2010-05-07 2010-05-08 2010-05-09
## 22 27 27 36 34 19 29
## 2010-05-10 2010-05-11 2010-05-12 2010-05-13 2010-05-14 2010-05-15 2010-05-16
## 14 29 27 33 11 9 22
## 2010-05-17 2010-05-18 2010-05-19 2010-05-20 2010-05-21 2010-05-22 2010-05-23
## 21 14 12 16 8 11 9
## 2010-05-24 2010-05-25 2010-05-26 2010-05-27 2010-05-28 2010-05-29 2010-05-30
## 10 6 5 25 20 21 14
## 2010-05-31 2010-06-01 2010-06-02 2010-06-03 2010-06-04 2010-06-05 2010-06-06
## 39 38 18 12 25 7 20
## 2010-06-07 2010-06-08 2010-06-09 2010-06-10 2010-06-11 2010-06-12 2010-06-13
## 15 7 10 11 19 18 13
## 2010-06-14 2010-06-15 2010-06-16 2010-06-17 2010-06-18 2010-06-19 2010-06-20
## 16 12 6 13 28 20 23
## 2010-06-21 2010-06-22 2010-06-23 2010-06-24 2010-06-25 2010-06-26 2010-06-27
## 18 21 47 12 11 9 26
## 2010-06-28 2010-06-29 2010-06-30 2010-07-01 2010-07-02 2010-07-03 2010-07-04
## 20 18 8 21 15 15 3
## 2010-07-05 2010-07-06 2010-07-07 2010-07-08 2010-07-09 2010-07-10 2010-07-11
## 8 27 21 20 20 7 9
## 2010-07-12 2010-07-13 2010-07-14 2010-07-15 2010-07-16 2010-07-17 2010-07-18
## 6 18 7 34 24 4 14
## 2010-07-19 2010-07-20 2010-07-21 2010-07-22 2010-07-23 2010-07-24 2010-07-25
## 22 3 5 15 14 12 38
## 2010-07-26 2010-07-27 2010-07-28 2010-07-29 2010-07-30 2010-08-01 2010-08-02
## 17 21 15 20 6 3 22
## 2010-08-03 2010-08-04 2010-08-05 2010-08-06 2010-08-07 2010-08-08 2010-08-09
## 9 12 18 15 31 23 26
## 2010-08-10 2010-08-11 2010-08-12 2010-08-13 2010-08-14 2010-08-15 2010-08-16
## 19 11 15 29 8 18 19
## 2010-08-17 2010-08-18 2010-08-19 2010-08-20 2010-08-21 2010-08-22 2010-08-23
## 19 25 30 28 16 8 34
## 2010-08-24 2010-08-25 2010-08-26 2010-08-27 2010-08-28 2010-08-29 2010-08-30
## 54 51 80 33 47 14 32
## 2010-08-31 2010-09-01 2010-09-02 2010-09-03 2010-09-04 2010-09-05 2010-09-06
## 19 20 25 23 9 32 19
## 2010-09-07 2010-09-08 2010-09-09 2010-09-10 2010-09-11 2010-09-12 2010-09-13
## 15 44 31 10 6 26 10
## 2010-09-14 2010-09-15 2010-09-16 2010-09-17 2010-09-18 2010-09-19 2010-09-20
## 13 7 21 19 22 21 20
## 2010-09-21 2010-09-22 2010-09-23 2010-09-24 2010-09-25 2010-09-26 2010-09-27
## 19 21 19 26 57 41 31
## 2010-09-28 2010-09-29 2010-09-30 2010-10-01 2010-10-02 2010-10-03 2010-10-04
## 17 16 36 25 27 19 13
## 2010-10-05 2010-10-06 2010-10-07 2010-10-08 2010-10-09 2010-10-10 2010-10-11
## 19 22 15 17 26 27 30
## 2010-10-12 2010-10-13 2010-10-14 2010-10-15 2010-10-16 2010-10-17 2010-10-18
## 17 19 14 16 17 13 20
## 2010-10-19 2010-10-20 2010-10-21 2010-10-22 2010-10-23 2010-10-24 2010-10-25
## 10 15 19 17 14 32 20
## 2010-10-26 2010-10-27 2010-10-28 2010-10-29 2010-10-30 2010-10-31 2010-11-01
## 29 10 11 20 15 15 5
## 2010-11-02 2010-11-03 2010-11-04 2010-11-05 2010-11-06 2010-11-07 2010-11-08
## 17 15 18 16 3 12 20
## 2010-11-09 2010-11-10 2010-11-11 2010-11-12 2010-11-13 2010-11-14 2010-11-15
## 18 23 42 22 39 40 7
## 2010-11-16 2010-11-17 2010-11-18 2010-11-19 2010-11-20 2010-11-21 2010-11-22
## 29 23 23 16 11 18 12
## 2010-11-23 2010-11-24 2010-11-25 2010-11-26 2010-11-27 2010-11-28 2010-11-29
## 19 16 14 7 29 39 29
## 2010-11-30 2010-12-01 2010-12-02 2010-12-03 2010-12-04 2010-12-05 2010-12-06
## 23 11 27 9 33 16 22
## 2010-12-07 2010-12-08 2010-12-09 2010-12-10 2010-12-11 2010-12-12 2010-12-13
## 26 38 28 9 19 19 24
## 2010-12-14 2010-12-15 2010-12-16 2010-12-17 2010-12-18 2010-12-19 2010-12-20
## 20 19 14 18 42 17 12
## 2010-12-21 2010-12-22 2010-12-23 2010-12-24 2010-12-25 2010-12-26 2010-12-27
## 29 36 12 5 4 9 14
## 2010-12-28 2010-12-29 2010-12-30 2010-12-31 2011-01-01 2011-01-02 2011-01-03
## 4 12 28 9 6 6 16
## 2011-01-04 2011-01-05 2011-01-06 2011-01-07 2011-01-08 2011-01-09 2011-01-10
## 10 6 18 13 38 9 12
## 2011-01-11 2011-01-12 2011-01-13 2011-01-14 2011-01-15 2011-01-16 2011-01-17
## 14 22 13 18 33 36 39
## 2011-01-18 2011-01-19 2011-01-20 2011-01-21 2011-01-22 2011-01-23 2011-01-24
## 12 31 25 33 48 37 27
## 2011-01-25 2011-01-26 2011-01-27 2011-01-28 2011-01-29 2011-01-30 2011-01-31
## 12 13 19 33 66 29 23
## 2011-02-01 2011-02-02 2011-02-03 2011-02-04 2011-02-05 2011-02-06 2011-02-07
## 15 21 20 29 28 9 10
## 2011-02-08 2011-02-09 2011-02-10 2011-02-11 2011-02-12 2011-02-13 2011-02-14
## 15 13 32 18 23 51 43
## 2011-02-15 2011-02-16 2011-02-17 2011-02-18 2011-02-19 2011-02-20 2011-02-21
## 29 11 20 22 19 42 83
## 2011-02-22 2011-02-23 2011-02-24 2011-02-25 2011-02-26 2011-02-27 2011-02-28
## 34 22 30 33 67 32 11
## 2011-03-01 2011-03-02 2011-03-03 2011-03-04 2011-03-05 2011-03-06 2011-03-07
## 26 36 22 22 27 56 15
## 2011-03-08 2011-03-09 2011-03-10 2011-03-11 2011-03-12 2011-03-13 2011-03-14
## 31 22 8 37 42 23 23
## 2011-03-15 2011-03-16 2011-03-17 2011-03-18 2011-03-19 2011-03-20 2011-03-21
## 34 32 26 14 38 66 48
## 2011-03-22 2011-03-23 2011-03-24 2011-03-25 2011-03-26 2011-03-27 2011-03-28
## 18 43 15 12 39 34 12
## 2011-03-29 2011-03-30 2011-03-31 2011-04-01 2011-04-02 2011-04-03 2011-04-04
## 29 27 14 42 36 42 32
## 2011-04-05 2011-04-06 2011-04-07 2011-04-08 2011-04-09 2011-04-10 2011-04-11
## 41 6 43 21 16 24 15
## 2011-04-12 2011-04-13 2011-04-14 2011-04-15 2011-04-16 2011-04-17 2011-04-18
## 10 16 15 17 16 8 16
## 2011-04-19 2011-04-20 2011-04-21 2011-04-22 2011-04-23 2011-04-24 2011-04-25
## 17 23 11 22 17 11 11
## 2011-04-26 2011-04-27 2011-04-28 2011-04-29 2011-04-30 2011-05-01 2011-05-02
## 25 10 11 21 16 20 20
## 2011-05-03 2011-05-04 2011-05-05 2011-05-06 2011-05-07 2011-05-08 2011-05-09
## 20 9 29 21 25 22 24
## 2011-05-10 2011-05-11 2011-05-12 2011-05-13 2011-05-14 2011-05-15 2011-05-16
## 11 10 27 22 19 30 27
## 2011-05-17 2011-05-18 2011-05-19 2011-05-20 2011-05-21 2011-05-22 2011-05-23
## 28 17 30 17 19 35 17
## 2011-05-24 2011-05-25 2011-05-26 2011-05-27 2011-05-28 2011-05-29 2011-05-30
## 13 32 10 14 27 26 19
## 2011-05-31 2011-06-01 2011-06-02 2011-06-03 2011-06-04 2011-06-05 2011-06-06
## 12 7 10 27 22 15 13
## 2011-06-07 2011-06-08 2011-06-09 2011-06-10 2011-06-11 2011-06-12 2011-06-13
## 14 12 20 22 34 17 8
## 2011-06-14 2011-06-15 2011-06-16 2011-06-17 2011-06-18 2011-06-19 2011-06-20
## 17 27 24 62 23 9 34
## 2011-06-21 2011-06-22 2011-06-23 2011-06-24 2011-06-25 2011-06-26 2011-06-27
## 25 36 29 21 12 26 9
## 2011-06-28 2011-06-29 2011-06-30 2011-07-01 2011-07-02 2011-07-03 2011-07-04
## 18 19 11 25 9 15 7
## 2011-07-05 2011-07-06 2011-07-07 2011-07-08 2011-07-09 2011-07-10 2011-07-11
## 25 33 21 43 13 40 11
## 2011-07-12 2011-07-13 2011-07-14 2011-07-15 2011-07-16 2011-07-17 2011-07-18
## 29 22 17 14 11 14 14
## 2011-07-19 2011-07-20 2011-07-21 2011-07-22 2011-07-23 2011-07-24 2011-07-25
## 24 36 17 49 11 17 16
## 2011-07-26 2011-07-27 2011-07-28 2011-07-29 2011-07-30 2011-07-31 2011-08-01
## 47 22 14 23 24 31 16
## 2011-08-02 2011-08-03 2011-08-04 2011-08-05 2011-08-06 2011-08-07 2011-08-08
## 12 23 17 15 16 22 12
## 2011-08-09 2011-08-10 2011-08-11 2011-08-12 2011-08-13 2011-08-14 2011-08-15
## 6 8 21 11 19 11 20
## 2011-08-16 2011-08-17 2011-08-18 2011-08-19 2011-08-20 2011-08-21 2011-08-22
## 10 13 19 41 20 21 115
## 2011-08-23 2011-08-24 2011-08-25 2011-08-26 2011-08-27 2011-08-31 2011-09-01
## 23 23 42 33 15 5 11
## 2011-09-02 2011-09-03 2011-09-04 2011-09-05 2011-09-06 2011-09-07 2011-09-08
## 7 7 11 11 21 9 20
## 2011-09-09 2011-09-10 2011-09-11 2011-09-12 2011-09-13 2011-09-14 2011-09-15
## 31 40 20 20 14 28 25
## 2011-09-16 2011-09-17 2011-09-18 2011-09-19 2011-09-20 2011-09-21 2011-09-22
## 21 12 33 32 27 21 37
## 2011-09-23 2011-09-24 2011-09-25 2011-09-26 2011-09-27 2011-09-28 2011-09-29
## 37 14 20 24 16 11 16
## 2011-09-30 2011-10-01 2011-10-02 2011-10-03 2011-10-04 2011-10-05 2011-10-06
## 20 11 16 14 21 14 16
## 2011-10-07 2011-10-08 2011-10-09 2011-10-10 2011-10-11 2011-10-12 2011-10-13
## 20 12 18 27 33 25 19
## 2011-10-14 2011-10-15 2011-10-16 2011-10-17 2011-10-18 2011-10-19 2011-10-20
## 25 35 47 15 13 21 23
## 2011-10-21 2011-10-22 2011-10-23 2011-10-24 2011-10-25 2011-10-26 2011-10-27
## 35 12 26 45 28 28 17
## 2011-10-28 2011-10-29 2011-10-30 2011-10-31 2011-11-01 2011-11-02 2011-11-03
## 23 28 14 13 9 8 20
## 2011-11-04 2011-11-05 2011-11-06 2011-11-07 2011-11-08 2011-11-09 2011-11-10
## 7 12 5 5 24 5 27
## 2011-11-11 2011-11-12 2011-11-13 2011-11-14 2011-11-15 2011-11-16 2011-11-17
## 29 29 15 11 36 30 55
## 2011-11-18 2011-11-19 2011-11-20 2011-11-21 2011-11-22 2011-11-23 2011-11-24
## 36 9 14 9 18 32 17
## 2011-11-25 2011-11-26 2011-11-27 2011-11-28 2011-11-29 2011-11-30 2011-12-01
## 17 36 36 20 34 8 4
## 2011-12-02 2011-12-03 2011-12-04 2011-12-05 2011-12-06 2011-12-07 2011-12-08
## 10 10 15 31 20 33 20
## 2011-12-09 2011-12-10 2011-12-11 2011-12-12 2011-12-13 2011-12-14 2011-12-15
## 15 19 34 31 19 8 16
## 2011-12-16 2011-12-17 2011-12-18 2011-12-19 2011-12-20 2011-12-21 2011-12-22
## 38 30 38 27 10 43 30
## 2011-12-23 2011-12-24 2011-12-25 2011-12-26 2011-12-27 2011-12-28 2011-12-29
## 13 17 9 10 23 34 20
## 2011-12-30 2011-12-31 2012-01-01 2012-01-02 2012-01-03 2012-01-04 2012-01-05
## 21 15 15 13 11 25 37
## 2012-01-06 2012-01-07 2012-01-08 2012-01-09 2012-01-10 2012-01-11 2012-01-12
## 38 2 21 18 21 6 29
## 2012-01-13 2012-01-14 2012-01-15 2012-01-16 2012-01-17 2012-01-18 2012-01-19
## 30 15 16 21 25 24 8
## 2012-01-20 2012-01-21 2012-01-22 2012-01-23 2012-01-24 2012-01-25 2012-01-26
## 22 63 26 33 24 18 17
## 2012-01-27 2012-01-28 2012-01-29 2012-01-30 2012-01-31 2012-02-01 2012-02-02
## 23 42 31 14 50 26 27
## 2012-02-03 2012-02-04 2012-02-05 2012-02-06 2012-02-07 2012-02-08 2012-02-09
## 27 14 8 15 26 11 30
## 2012-02-10 2012-02-11 2012-02-12 2012-02-13 2012-02-14 2012-02-15 2012-02-16
## 15 26 17 18 27 11 20
## 2012-02-17 2012-02-18 2012-02-19 2012-02-20 2012-02-21 2012-02-22 2012-02-23
## 17 10 19 20 16 41 21
## 2012-02-24 2012-02-25 2012-02-26 2012-02-27 2012-02-28 2012-02-29 2012-03-01
## 53 16 13 16 48 59 19
## 2012-03-02 2012-03-03 2012-03-04 2012-03-05 2012-03-06 2012-03-07 2012-03-08
## 39 47 33 26 32 14 32
## 2012-03-09 2012-03-10 2012-03-11 2012-03-12 2012-03-13 2012-03-14 2012-03-15
## 28 14 12 34 26 25 14
## 2012-03-16 2012-03-17 2012-03-18 2012-03-19 2012-03-20 2012-03-21 2012-03-22
## 24 8 38 9 22 24 11
## 2012-03-23 2012-03-24 2012-03-25 2012-03-26 2012-03-27 2012-03-28 2012-03-29
## 13 9 26 62 12 9 26
## 2012-03-30 2012-03-31 2012-04-01 2012-04-02 2012-04-03 2012-04-04 2012-04-05
## 6 9 13 30 24 17 27
## 2012-04-06 2012-04-07 2012-04-08 2012-04-09 2012-04-10 2012-04-11 2012-04-12
## 16 14 30 15 19 16 21
## 2012-04-13 2012-04-14 2012-04-15 2012-04-16 2012-04-17 2012-04-18 2012-04-19
## 15 25 18 53 19 27 19
## 2012-04-20 2012-04-21 2012-04-22 2012-04-23 2012-04-24 2012-04-25 2012-04-26
## 20 11 26 34 16 19 29
## 2012-04-27 2012-04-28 2012-04-29 2012-04-30 2012-05-01 2012-05-02 2012-05-03
## 24 24 56 16 12 31 19
## 2012-05-04 2012-05-05 2012-05-06 2012-05-07 2012-05-08 2012-05-09 2012-05-10
## 18 10 15 42 18 29 29
## 2012-05-11 2012-05-12 2012-05-13 2012-05-14 2012-05-15 2012-05-16 2012-05-17
## 29 11 13 20 9 18 36
## 2012-05-18 2012-05-19 2012-05-20 2012-05-21 2012-05-22 2012-05-23 2012-05-24
## 27 32 21 16 10 32 29
## 2012-05-25 2012-05-26 2012-05-27 2012-05-28 2012-05-29 2012-05-30 2012-05-31
## 25 19 18 8 19 35 8
## 2012-06-01 2012-06-02 2012-06-03 2012-06-04 2012-06-05 2012-06-06 2012-06-07
## 20 23 11 25 26 26 34
## 2012-06-08 2012-06-09 2012-06-10 2012-06-11 2012-06-12 2012-06-13 2012-06-14
## 19 25 8 13 19 28 19
## 2012-06-15 2012-06-16 2012-06-17 2012-06-18 2012-06-19 2012-06-20 2012-06-21
## 37 19 18 31 32 9 7
## 2012-06-22 2012-06-23 2012-06-24 2012-06-25 2012-06-26 2012-06-27 2012-06-28
## 25 43 64 7 13 25 25
## 2012-06-29 2012-06-30 2012-07-01 2012-07-02 2012-07-03 2012-07-04 2012-07-05
## 15 14 46 37 50 14 9
## 2012-07-06 2012-07-07 2012-07-08 2012-07-09 2012-07-10 2012-07-11 2012-07-12
## 24 45 21 17 22 15 26
## 2012-07-13 2012-07-14 2012-07-15 2012-07-16 2012-07-17 2012-07-18 2012-07-19
## 16 15 24 16 37 17 23
## 2012-07-20 2012-07-21 2012-07-22 2012-07-23 2012-07-24 2012-07-25 2012-07-26
## 12 16 11 23 39 30 12
## 2012-07-27 2012-07-28 2012-07-29 2012-07-30 2012-07-31 2012-08-01 2012-08-02
## 30 25 2 18 20 34 26
## 2012-08-03 2012-08-04 2012-08-05 2012-08-06 2012-08-07 2012-08-08 2012-08-09
## 19 24 26 21 15 27 22
## 2012-08-10 2012-08-11 2012-08-12 2012-08-13 2012-08-14 2012-08-15 2012-08-16
## 15 14 17 15 14 20 19
## 2012-08-17 2012-08-18 2012-08-19 2012-08-20 2012-08-21 2012-08-22 2012-08-23
## 6 6 5 11 20 25 22
## 2012-08-24 2012-08-25 2012-08-26 2012-08-27 2012-08-28 2012-08-29 2012-08-30
## 31 10 8 36 33 48 12
## 2012-08-31 2012-09-01 2012-09-02 2012-09-03 2012-09-04 2012-09-05 2012-09-06
## 7 8 3 11 13 15 16
## 2012-09-07 2012-09-08 2012-09-09 2012-09-10 2012-09-11 2012-09-12 2012-09-13
## 8 7 28 19 57 76 31
## 2012-09-14 2012-09-15 2012-09-16 2012-09-17 2012-09-18 2012-09-19 2012-09-20
## 64 60 60 26 20 20 17
## 2012-09-21 2012-09-22 2012-09-23 2012-09-24 2012-09-25 2012-09-26 2012-09-27
## 26 36 44 24 11 14 16
## 2012-09-28 2012-09-29 2012-09-30 2012-10-01 2012-10-02 2012-10-03 2012-10-04
## 13 17 18 30 5 22 13
## 2012-10-05 2012-10-06 2012-10-07 2012-10-08 2012-10-09 2012-10-10 2012-10-11
## 6 9 27 30 13 31 15
## 2012-10-12 2012-10-13 2012-10-14 2012-10-15 2012-10-16 2012-10-17 2012-10-18
## 29 18 13 13 15 34 11
## 2012-10-19 2012-10-20 2012-10-21 2012-10-22 2012-10-23 2012-10-24 2012-10-25
## 30 28 23 18 13 13 36
## 2012-10-26 2012-10-27 2012-10-28 2012-10-29 2012-11-09 2012-11-10 2012-11-11
## 19 4 12 10 1 19 16
## 2012-11-12 2012-11-13 2012-11-14 2012-11-15 2012-11-16 2012-11-17 2012-11-18
## 15 18 65 31 4 11 14
## 2012-11-19 2012-11-20 2012-11-21 2012-11-22 2012-11-23 2012-11-24 2012-11-25
## 12 9 23 18 21 18 22
## 2012-11-26 2012-11-27 2012-11-28 2012-11-29 2012-11-30 2012-12-01 2012-12-02
## 24 9 10 18 11 9 12
## 2012-12-03 2012-12-04 2012-12-05 2012-12-06 2012-12-07 2012-12-08 2012-12-09
## 6 13 19 23 12 4 5
## 2012-12-10 2012-12-11 2012-12-12 2012-12-13 2012-12-14 2012-12-15 2012-12-16
## 7 3 7 4 5 4 2
## 2012-12-17 2012-12-18 2012-12-19 2012-12-20 2012-12-21 2012-12-22 2012-12-23
## 1 18 5 34 10 2 2
## 2012-12-24 2012-12-26 2012-12-27 2012-12-28 2012-12-29 2012-12-30 2012-12-31
## 33 13 9 8 5 4 1
## 2013-01-01 2013-01-02 2013-01-03 2013-01-04 2013-01-05 2013-01-06 2013-01-07
## 3 12 17 47 24 15 18
## 2013-01-08 2013-01-09 2013-01-10 2013-01-11 2013-01-12 2013-01-13 2013-01-14
## 37 19 40 29 15 15 16
## 2013-01-15 2013-01-16 2013-01-17 2013-01-18 2013-01-19 2013-01-20 2013-01-21
## 24 14 14 16 33 9 11
## 2013-01-22 2013-01-23 2013-01-24 2013-01-25 2013-01-26 2013-01-27 2013-01-28
## 22 61 45 29 12 21 14
## 2013-01-29 2013-01-30 2013-01-31 2013-02-01 2014-08-12 2014-08-13
## 11 13 10 11 1 2
datedf<- as.data.frame(tabledate)
head(datedf)
## Var1 Freq
## 1 0000-00-00 4
## 2 1995-03-02 2
## 3 1996-03-27 2
## 4 2003-08-27 1
## 5 2006-02-15 1
## 6 2007-09-17 2
colnames(datedf)[1]<-"date"
colnames(datedf)[2]<-"number sent on date"
mergefromdate<-merge.data.frame(fromfreq, datedf)
top5df<- mergefromdate[which(mergefromdate$"number sent from sender" >868),]
head(top5df)
## sender number sent from sender date number sent on date
## 64 Cheryl Mills 5121 0000-00-00 4
## 144 Hillary Clinton 8274 0000-00-00 4
## 148 Huma Abedin 3880 0000-00-00 4
## 156 Jake Sullivan 4683 0000-00-00 4
## 319 Sidney Blumenthal 869 0000-00-00 4
## 423 Cheryl Mills 5121 1995-03-02 2
#remove number sent from sender from df
plotdf = subset(top5df, select= -(2) )
library(ggplot2)
emailsrec<-ggplot(plotdf, aes(x=date, y=`number sent on date`, color= sender))+ geom_point() + geom_point(position= "jitter")
emailsrec