0
이전 대답에서 사용한 방법을 복제하려고 시도하고 있습니다. Scraping html tables into R data frames using the XML package은 내 작업이지만 추출 할 데이터는 얻을 수 없습니다. 내가 사용하고있는 웹 사이트는 다음과 같습니다 : http://www.footballfanalytics.com/articles/football/euro_super_league_table.htmlXML을 사용하는 웹 사이트에서 테이블 추출하기
각 팀 이름과 현재 등급 점수 테이블을 추출하고 싶습니다.
이library(XML)
theurl <- "http://www.footballfanalytics.com/articles/football/euro_super_league_table.html"
tables <- readHTMLTable(theurl)
n.rows <- unlist(lapply(tables, function(t) dim(t)[1]))
tables[[which.max(n.rows)]]
이
이Error in tables[[which.max(n.rows)]] :
attempt to select less than one element
가
사람이 해결책을 제시 할 수있는 오류 메시지를하시기 바랍니다 생성 다음과 같이 내 코드는? 이 특정 사이트에이 기능이 작동하지 않는 것이 있습니까? 아니면 시도 할 수있는 더 나은 대체 방법이 있습니까? 감사합니다