Skip to content

Instantly share code, notes, and snippets.

@csgallego
Created January 31, 2014 05:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csgallego/8727093 to your computer and use it in GitHub Desktop.
Save csgallego/8727093 to your computer and use it in GitHub Desktop.
#We created a subsrting of those who visited POTUS on June 5th:
POTUS[paste(POTUS$time$mon+1,POTUS$time$mday)=="6 5”,]
#Let’s look at only the full names:
POTUS[paste(POTUS$time$mon+1,POTUS$time$mday)=="6 5",c("NAMEFIRST","NAMELAST”)]
#Let’s look at only the 4 first columns:
POTUS[paste(POTUS$time$mon+1,POTUS$time$mday)=="6 5",1:4]
#We want to add the “column” description which gives us interesting information (it is the column 27):
POTUS[paste(POTUS$time$mon+1,POTUS$time$mday)=="6 5",c(1:4,27)]
#We create June5 (which gives us with everybody who visited POTUS on June 5th):
June5=POTUS[paste(POTUS$time$mon+1,POTUS$time$mday)=="6 5”,]
#Let’s create a table of June 5:
table(June5$UIN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment