1
我正在尝试使用jsonlite从web中的rbind.pages获取一些数据文件丢失(例如缺少aa的值)。rbind.pages with missing pages“Error:all(vapply(pages,is.data.frame,logical(1)))”is not TRUE
temp<- c("6702","1","67")
library(jsonlite)
baseurl <- "https://api.angel.co/1/startups/"
pages <- list()
for(i in 1:3){
mydata<- fromJSON(paste0(baseurl,temp[[i]]),flatten= TRUE)
pages[[i+1]] <- mydata
}
out<- rbind.pages(pages[sapply(pages, length)>2])
我收到以下错误。有关如何解决这个问题的任何建议?谢谢。
Error: Error in open.connection(con, "rb") : HTTP error 404.
Error: all(vapply(pages, is.data.frame, logical(1))) is not TRUE
喜欢与你[最后一个问题(http://stackoverflow.com/questions/30539282/combining-many-data-frames-with-rbind-and-pages ),我们需要一个[可重现的例子](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)。 – MrFlick
我可以指定外部URL/API链接吗? – user3570187
你什么时候做'页面[[i + 1]] < - mydata'而不是'pages [[i]] < - mydata'?你没有'rbind.pages()'列表中的NULL项' – MrFlick