vos_query {virtuoso}R Documentation

Run a SPARQL query

Description

Run a SPARQL query

Usage

vos_query(con, query)

Arguments

con

a ODBC connection to Virtuoso, from vos_connect()

query

a SPARQL query statement

Details

SPARQL is a graph query language similar in syntax SQL, but allows the use of variables to walk through graph nodes.

Value

a data.frame containing the results of the query

References

See Also

vos_start(), vos_connect()

Examples

vos_status()

if(has_virtuoso()){
vos_start()
con <- vos_connect()

# show first 4 triples in the database
DBI::dbGetQuery(con, "SPARQL SELECT * WHERE { ?s ?p ?o } LIMIT 4")
}


[Package virtuoso version 0.1.8 Index]