Getting started:
Related tutorials:
Getting started:
Related tutorials:
| # 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) | |
| } |