在R中从web中删除表数据

在R中从web中删除表数据,r,R,我试图从R中的以下链接中提取表 library(rvest) library(XML) library(stringr) library(tidyr) url <- "http://www.moneycontrol.com/stocks/hist_index_result.php?indian_indices=9" nifty_index <- url %>% read_html() %>% html_nodes(xpath='//*[@id="mc_mainWrapp

我试图从R中的以下链接中提取表

library(rvest)
library(XML)
library(stringr)
library(tidyr)

url <- "http://www.moneycontrol.com/stocks/hist_index_result.php?indian_indices=9"
nifty_index <- url %>%
read_html() %>%
html_nodes(xpath='//*[@id="mc_mainWrapper"]/div[2]/div/div[3]/div[4]/table') %>%
html_table()
nifty_index <- nifty_index[[1]]


Error 

Error in matrix(NA_character_, nrow = n, ncol = maxp) : 
invalid 'ncol' value (too large or NA)
In addition: Warning messages:
1: In max(p) : no non-missing arguments to max; returning -Inf
2: In matrix(NA_character_, nrow = n, ncol = maxp) :
NAs introduced by coercion to integer range
库(rvest)
库(XML)
图书馆(stringr)
图书馆(tidyr)
url%
html_节点(xpath='/*[@id=“mc_mainWrapper”]/div[2]/div/div[3]/div[4]/table')%>%
html_表()

漂亮的索引当我浏览地址时,我得到了一个空页面?
http://www.moneycontrol.com/stocks/histstock.php
这是链接,然后我在Dailyon中填写了日期范围。当我选择日期范围时,我得到了此链接
http://www.moneycontrol.com/stocks/hist_index_result.php?indian_indices=9
,但当我将此链接粘贴到其他选项卡时,我会看到一个空白页。如何处理这个问题?当我浏览地址时,我得到一个空页面?
http://www.moneycontrol.com/stocks/histstock.php
这是链接,然后我在Dailyon中填写了日期范围。当我选择日期范围时,我得到了此链接
http://www.moneycontrol.com/stocks/hist_index_result.php?indian_indices=9
,但当我将此链接粘贴到其他选项卡时,我会看到一个空白页。如何处理这个问题?