繁体   English   中英

Rstudio 上的 SPARQL 错误

[英]Error with SPARQL on Rstudio

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

> 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”包及其依赖项,如下所示。

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

如果您可以运行以下示例代码,那就太好了。

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)

我希望它对你有用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM