Hello,

Try the following


library(XML)

url <- "http://ratings.fide.com/top.phtml?list=men";
chess <- readHTMLTable(url, header = TRUE, which = 5)

str(chess)  # See what we have

# All variables are factors,
# convert these to integer
chess$Rating <- as.integer(chess$Rating)
chess$Games <- as.integer(chess$Games)
chess$`B-Year` <- as.integer(chess$`B-Year`)

head(chess, 20)  # See first 20 rows


Hope this helps,

Rui Barradas
Em 02-09-2012 17:41, David Arnold escreveu:
All,

What would be the most efficient way to load the data at the following
address into a dataframe?

http://ratings.fide.com/top.phtml?list=men

Thanks,

David



--
View this message in context: 
http://r.789695.n4.nabble.com/Loading-Chess-Data-tp4642006.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to