I'm using the code below in order to scrape a webpage's list.The result that I get is only the table's header.How can I scrape the whole table?
library(rvest)
theurl <- "http://www.forbes.com/midas/list/"
file<-read_html(theurl)
tables<-html_nodes(file, "table")
table1 <- html_table(tables[2], fill = F)
table1
c<-as.data.frame(lapply(table1, stack))
summary(c$values)
head(c$values)