runQuery | R Documentation |
To run a query users need to supply a database connection, the query to run, the scenarios to query, and regions to query.
runQuery(dbConn, query, scenarios = NULL, regions = NULL, warn.empty = TRUE)
## S3 method for class 'localDBConn'
runQuery(dbConn, query, scenarios = NULL, regions = NULL, warn.empty = TRUE)
## S3 method for class 'remoteDBConn'
runQuery(dbConn, query, scenarios = NULL, regions = NULL, warn.empty = TRUE)
dbConn |
The connection to a database which will handle running the query. |
query |
A Model Interface query to run. This is typically provided as the
XML typically found in the Main_queries.xml but could also be given for instance
as a query string that will result in XML such as:
|
scenarios |
A character vector of scenarios to query. Passing
|
regions |
A character vector of regions to query. |
warn.empty |
Flag: Issue a warning if a query is empty. |
A data.frame with the results.
localDBConn
: Run a query on a local GCAM database
remoteDBConn
: Run query specialization for remote databases
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.