Learn R Programming

eurlex (version 0.3.5)

elx_run_query: Execute SPARQL queries

Description

Executes cURL request to a pre-defined endpoint of the EU Publications Office. Relies on elx_make_query to generate valid SPARQL queries

Usage

elx_run_query(
  query = "",
  endpoint = "http://publications.europa.eu/webapi/rdf/sparql"
)

Arguments

query

A valid SPARQL query specified by `elx_make_query` or manually

endpoint

SPARQL endpoint

Value

A data frame containing the results of the SPARQL query. Column `work` contains the Cellar URI of the resource. Rows with even one missing variable are dropped.

Examples

Run this code
# NOT RUN {
elx_run_query(elx_make_query("directive", include_force = TRUE))
# }

Run the code above in your browser using DataLab