Extracting soccer scores from website Extracting soccer scores from website curl curl

Extracting soccer scores from website


The reason you are having trouble is that the given table is NOT an HTML Table. You can see that by using View Page Source in your browser. Here is some code to help you get started with extracting the data in the table and putting it into a data frame.

dat = readLines('http://www.rsssf.com/tablese/eng2014.html', warn = F)start = grep('Table', dat)[1] + 2end = grep('Round', dat)[1] - 2dat2 <- dat[start:end]dat3 = read.fwf(textConnection(dat2), widths = c(3, 24, 3, 3, 3, 3, 8, 3))dat3[dat3$V1 != "---",]