如何将此文本文件转换为 R data.frame

How to convert this text file into R data.frame

This is the text file.

y <- read.table("https://afltables.com/afl/stats/biglists/bg2.txt", skip = 1, header = T, sep = ' ')
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 3 did not have 30 elements

你可以试试这个。

y <- read.fwf("https://afltables.com/afl/stats/biglists/bg2.txt", skip = 3, widths=c(6, 9, 30, 2), col.names = c("Rank","Games","Player","Teams" ))