Rstudio 上的 SPARQL 错误 [英] Error with SPARQL on Rstudio

查看:52
本文介绍了Rstudio 上的 SPARQL 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Rstudio 中使用 sparql 包,通过 bio2rdf 查询 OMIM.我已经在 yasgui 中测试了我的查询并且它可以正常工作.但是从 Rstudio 他返回以下错误:

I'm using the sparql package in Rstudio, to query OMIM through bio2rdf. I have tested my query in yasgui and it works correctly. But from Rstudio he returns the following error:

> qde <- SPARQL(endpoint,query)
Opening and ending tag mismatch: hr line 5 and body
Opening and ending tag mismatch: body line 3 and html
Premature end of data in tag html line 1
Error: 1: Opening and ending tag mismatch: hr line 5 and body
2: Opening and ending tag mismatch: body line 3 and html
3: Premature end of data in tag html line 1

谢谢!!

推荐答案

不久前我在 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)

希望对你有用.

这篇关于Rstudio 上的 SPARQL 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆