2
I have to download the table of this link: http://www2.bmf.com.br/pages/portal/bmfbovespa/lumis/lum-taxas-referenciais-bmf-ptBR.asp
I’m trying to use the package rvest
, however, to no avail.
library('rvest')
url <- 'http://www2.bmf.com.br/pages/portal/bmfbovespa/lumis/lum-taxas-
referenciais-bmf-ptBR.asp'
site <- read_html(url)
info_Ajuste_HTML <- html_nodes(site,'table')
info_Ajuste <- html_text(info_Ajuste_HTML)
lista_tabela <- site
lista_tabela <- html_nodes(site, xpath = "//td")
lista_tabela <- html_table(site, fill = TRUE)
dados <- lista_tabela[[1]]
Could you tell us where you got the xpath?
– Alexandre Sanches
It was in the package documentation rvest.
– Rui Barradas