I'm scraping the 'ranking' table off of a website. The way the table is structured, the team, grand slam points, and overall points end up in the same column when scraped. I've tried the below, and it looks somewhat correct except the last row. It took the values of the first row and put them in the last row, but in the wrong place.
I actually have two questions. The first is, what should I do to fix this? The second is, I will be creating a loop to scrape this same table off of over 50 pages from this website. Is the structure I have below even acceptable for a loop?
library(rvest)
library(tidyverse)
Url = read_html('http://www.bjjcompsystem.com/tournaments/1869/categories/2053150')
tgo2 = Url %>%
html_nodes('td') %>%
html_text()
tgo2 = data.frame(tgo2)
t = as.data.frame(matrix(tgo2$tgo2, ncol = 3, byrow = TRUE))