evalQuery: evalQuery

Description Usage Arguments Value Examples

View source: R/repo_funcs.R

Description

Execute a SPARQL select query

Usage

1
2
3
4
evalQuery(repository, query, returnType = c("data.table", "dataframe",
  "matrix", "list"), infer = NULL, context = NULL, cleanUp = FALSE,
  namedContext = NULL, bindings = NULL, planner = NULL,
  checkVariables = NULL, limit = NULL, convert = FALSE)

Arguments

repository

Object of type repository specifying server details and repository to work on.

query

Sparql query to evaluate

returnType

In what format should the triples be returned. Can choose between "dataframe","matrix","list". Defaults to "list

infer

...

context

Can be a list. Specifies the contexts from which you want to query

cleanUp

If TRUE, removes the XML types of all variables. Currently for this to work, the return type needs to be a data.table. However, this is recommended either way.

namedContext

...

bindings

...

planner

...

checkVariables

If yes, then query warnings will cause the query to stop executing and fail.

limit

How many triples to return

convert

Convert variable to R type

Value

Triples in matrix form

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
query = "select ?s ?p ?o {?s ?p ?o}"
service = service("localhost","user","password")
rep = repository(catalog(service,"root"),"root")
evalQuery(rep,
query = query, returnType = "data.table",
cleanUp = TRUE, limit = 10)

## End(Not run)

baasman/allegRo documentation built on June 4, 2017, 12:11 a.m.