Learn R Programming

TSsdmx (version 2016.8-1)

verifyQuery: Check Query Against a Provider

Description

Check validity of fields of a query against a provider.

Usage

verifyQuery(provider, Q, verbose = TRUE)

Arguments

provider
Character string indicating a provider.
Q
Character string indicating fields of a query.
verbose
Logical indicating if problems should be printed out. If FALSE only return the logical result.

Value

Details

This functions check fields of the query Q against those expected by the provider indicated by provider. If all fields check ok then TRUE is returned, otherwise the result is FALSE. If verbose is TRUE then the first error found will be printed.

Note that, even though the query is valid, the providor may not have data for the specified combination of fields, in which case a data request will not return data.

As of February 2015, the WB provider is not responding to queries in the same way as it indicates they should be, so this utility is not very useful with this provider. That is, even if the declared structure is FREQ.SERIES.REF_AREA, you have to build the WB query as REF_AREA.SERIES.

See Also

getProviders, getFlows, getDimensions, getCodes

Examples

Run this code
## Not run: 
#   print(verifyQuery('IMFx', 'PGI.CA.*.*.*.*'))# returns FALSE
# 
#   print(verifyQuery('IMF', 'PGI.CA.*.*.*.*', verbose = FALSE)) # returns TRUE
# 
#   print(verifyQuery('IMF', 'PGI.CAN.*.*.*.*'))# returns FALSE 
# 
#   #print(verifyQuery('NBB', 'HICP.000000.*.*'))
#   #print(verifyQuery('NBB', 'HICP.000000.BE.M'))
#   ## End(Not run)

Run the code above in your browser using DataLab