query: Execute a query on data.world.

Description Usage Arguments Value Methods (by class) See Also Examples

View source: R/query.R

Description

Execute a query on data.world.

Usage

1
2
3
4
5
6
7
query(qry, ...)

## S3 method for class 'qry_sql'
query(qry, ...)

## S3 method for class 'qry_sparql'
query(qry, ...)

Arguments

qry

Query object of type qry_sql or qry_sparql.

...

either a single parameter dataset that is a full URL to a data.world dataset or a qualified dataset reference of the form owner/dataset, OR separate parameters owner_id and dataset_id

Value

Query results as a data frame.

Methods (by class)

See Also

sql sparql

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
  sql_stmt <- data.world::qry_sql("SELECT * FROM Tables")
  query_results_df <- data.world::query(
    sql_stmt, "jonloyens", "an-intro-to-dataworld-dataset")

## End(Not run)
## Not run: 
  sparql_stmt <- data.world::qry_sparql("SELECT ?s ?p ?o
                                         WHERE {
                                           ?s ?p ?o.
                                         }")
  query_results_df <- data.world::query(
    sparql_stmt, "jonloyens", "an-intro-to-dataworld-dataset")

## End(Not run)

datadotworld/data.world-r documentation built on July 2, 2021, 2:17 a.m.