I am a complete beginner in R.
I try to scrap an HTML table from a website. I have managed to do that with the use of the following:
library(rvest) url <- "https://www.biznesradar.pl/notowania-historyczne/PEKABEX,1" page <- read_html(url) col_table = page %>% html_node("table.qTableFull") %>% html_table()
The problem is that the table is contained on multiple URL pages and the only difference between the URLS is that they end with a different number i.e.
url1 <- "https://www.biznesradar.pl/notowania-historyczne/PEKABEX,1" url2 <- "https://www.biznesradar.pl/notowania-historyczne/PEKABEX,2"
So I have tried to use a sequence to create multiple variables:
url <- paste("https://www.biznesradar.pl/notowania-historyczne/PEKABEX",seq(1,15),sep = ",")
However, the R stores them as a list and now I cannot feed them into the read_html function. How can I create a sequence of variables with each storing the right URL so I can feed each one of them into the read_html() function?