Skip to content

Instantly share code, notes, and snippets.

@grantkuo
grantkuo / README.md
Created November 30, 2017 00:19 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@grantkuo
grantkuo / get_scores.R
Created July 25, 2011 19:27 — forked from drewconway/get_scores.R
Function returns quater scores from Wikipedia Super Bown pages
# Function returns quater scores from Wikipedia Super Bown pages
get.scores<-function(numeral) {
# Base URL for Wikipedia
wp.url<-getURL(paste("http://en.wikipedia.org/wiki/Super_Bowl_",numeral,sep=""))
wp.data<-htmlTreeParse(wp.url, useInternalNodes=TRUE)
score.html<-getNodeSet(wp.data,"//table[@style='background-color:transparent;']")
score.table<-readHTMLTable(score.html[[1]])
score.table<-transform(score.table, SB=numeral)
return(score.table)
}