
Run a single-BGP SPARQL select returning subject-object pairs
Source:R/sparql-helpers.R
sparql_pairs.RdIssues a SELECT ?s ?o WHERE { ?s P ?o } query where P is the supplied
predicate. The predicate position is constant. Both subject and object are
bound. This is a single triple match, the only pattern shape librdf
reliably plans on graphs of cybedtools' scale.
Arguments
- rdf
An rdf object from
rdflib::rdf_parse()orload_combined_ntriples_graph().- predicate
Character. A SPARQL predicate (e.g.,
"cybed:partOf","schema:name","a"). Use the prefixed form.default_prefixes()supplies cybed, schema, rdfs, and skos.
Value
A tibble with columns s (character, subject URI) and o
(character, object value, either URI or literal).
Examples
if (FALSE) { # \dontrun{
rdf <- load_combined_ntriples_graph()
sparql_pairs(rdf, "cybed:jurisdiction")
} # }