I am working on an R script to loop through the next page of a website until the end. I'm running into a wall on how to go about creating a for loop cycle through all the pages.
library(rvest)
url <- paste0("https://www.basketball-reference.com/play-index/pgl_finder.cgi?request=1&match=game&year_min=2017&year_max=2017&is_playoffs=N&age_min=0&age_max=99&season_start=1&season_end=-1&pos_is_g=Y&pos_is_gf=Y&pos_is_f=Y&pos_is_fg=Y&pos_is_fc=Y&pos_is_c=Y&pos_is_cf=Y&order_by=player")
#pageloop <- "&offset" = 100
html <- xml2::read_html(url)
node <- rvest::html_node(html, "table")
table <- rvest::html_table(node, header = TRUE)