我在rstudio中有这个r块:
library(rvest)
library(lubridate)
library(tidyverse)
page <- "https://www.kaggle.com/uciml/indian-liver-patient-records"
XPATH <- '/html/body/div[2]/div[2]/div/div'
table_list <-
page %>%
read_html() %>%
html_nodes(xpath = XPATH) %>%
html_table(fill = TRUE)
Indian_Liver_Patient <- table_list[[1]]
str(Indian_Liver_Patient)
然后我收到一条错误消息:
Error in table_list[[1]] : subscript out of bounds