Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 url 中传递一个变量并使用 jsonlite 进行展平,但我无法使用循环传递变量页面。我如何使用 FromJSON 循环?
pages<- list() for(i in 1:20) { mydata <- fromJSON("https:www.example.com/page="+i+"&access_token=xyz", flatten = TRUE) } filings <-rbind.pages(pages)
What about this?
pages<- list() for(i in 1:20) { mydata <- fromJSON(paste("https:www.example.com/page=", i, "&access_token=xyz", sep = "+"), flatten = TRUE) } filings <-rbind.pages(pages)