且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Rstudio 上的 SPARQL 错误

更新时间:2023-01-10 08:30:09

不久前我在 RStudio 上遇到了同样的问题.这个问题是包依赖.您确实安装了sparql"包及其依赖项,如下所示.

I had the same problem on RStudio a while ago. This problem was package dependencies. You do install the "sparql" package and its dependencies as below.

install.packages(c("SPARQL", "XML", "RCurl"))

如果你能运行下面的示例代码就太好了.

It would be great if you could run the below sample code.

d <- SPARQL(url="http://statistics.data.gov.uk/sparql",
            query="SELECT * WHERE { ?s ?p ?o . } LIMIT 10",
            ns=c('time','<http://www.w3.org/2006/time#>'))
is.data.frame(d$results)
head(d$results)

希望对你有用.