Personal,
with the tips I received I was able to download and work with the spreadsheet, follow the code:
Code requires XML package
library(XML)
Tf <- tempfile()
url <- "http://www1.caixa.gov.br/lotteries/lotteries/lotteries/D_lotfac.zip"
I downloaded it using "Wb mode"
download.file( url, Tf, mode = "Wb")
file.Names <-unzip(Tf)
After unzip the spreadsheet of numbers was in the D_LOTFAC.HTM file
urll <- "file://C:/Users/Rgio/Desktop/D_LOTFAC.HTM"
polls <- readHTMLTable(readLines(urll), which = 1, header = TRUE, stringsAsFactors = FALSE)
The spreadsheet contained a lot of NA’s so I cleaned it with the complete cases.
loto <- complete.cases(polls)
hist <- polls[lotus,]
I have selected only the first 17 columns where the drawn numbers are
historical <- hist[,1:17]
The result was surprising!
Thank you all
Sergio Simioni
Precisely I can not say, from a read on this link, maybe you have a way to start. http://rpubs.com/statshero/opinion-polls
– Guilherme Lima