在R Markdown中编译时出错

时间:2015-07-07 23:07:12

标签: r r-markdown

我有一堆代码,我试图在R Markdown中编译。

library(jsonlite)
library(rvest)
library(RJSONIO)
library(ggplot2)
library(dplyr)
library(data.table)

#Create a function that will download movie info
rottenrate <- function(movie){
  require(RJSONIO)
  link <- paste("http://www.omdbapi.com/?t=", movie, "&y=&plot=short&r=json&tomatoes=true", sep = "")
  jsonData <- fromJSON(link)
  return(jsonData)
}
vrottenrate <- Vectorize(rottenrate, "movie", SIMPLIFY = F)

当我运行时,我遇到了

Error in file(con, "r") : cannot open the connection
Calls: &lt;Anonymous&gt; ... &lt;Anonymous&gt; -&gt; fromJSON -&gt; fromJSON -&gt; I -&gt; structure -&gt; unique

0 个答案:

没有答案