-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The code below tries to submit a query to the endpoint but it requires the syntax to be at the end of the URL with q=.
How to submit a query from within R using the SPARQL standard package.
It works with many other endpoints just fine.
library(SPARQL)
Loading required package: XML
Loading required package: RCurl
Loading required package: bitops
endpoint<-'http://data.linkedct.org/sparql'
qs<-"
- PREFIX meshv: http://id.nlm.nih.gov/mesh/vocab#
- PREFIX mesh: http://id.nlm.nih.gov/mesh/
- SELECT DISTINCT ?predicate
- FROM http://id.nlm.nih.gov/mesh
- WHERE {
- ?s ?predicate ?o
- }
- ORDER BY ?p
- "
cat(qs)
PREFIX meshv: http://id.nlm.nih.gov/mesh/vocab#
PREFIX mesh: http://id.nlm.nih.gov/mesh/
SELECT DISTINCT ?predicate
FROM http://id.nlm.nih.gov/mesh
WHERE {
?s ?predicate ?o
}
ORDER BY ?p
rs<-SPARQL(url=endpoint, query=qs)
Error: XML content does not seem to be XML: ''
rs<-SPARQL(url=endpoint, query=qs)
Error: XML content does not seem to be XML: ''
Metadata
Metadata
Assignees
Labels
No labels