Description Usage Arguments Value Remarks Examples
This is the main function of this package. It retrieves a data table from the data base and all dimensions are decoded (if requested). An (optional) query is executed in the database
1 2 3 4 5 6 7 8 9 |
root |
Character string with root of structure. Default NULL i.e. determined by the last use of |
table_id |
Character string with identification of table |
query |
OData query to restrict data returned from structure |
typed |
Boolean indicating 'TypedDataSet' when T or 'UntypedDataSet' when F |
decode |
Boolean indicating if fields are to be decoded (default T) |
keepcode |
Character string with dimension(s) for which the coded values are kept |
debug |
Boolean indicating if (for debugging) the generated OData queries are to be printed (default FALSE) |
A tibble
(data_frame
) when successful otherwise an empty tibble
or a message
See http://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol/ or http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html (depending on the version of the OData protocol that is used) for details about the query possibilities.
$format=json
is forced by the code so do not specify $format=atom
because this will not work
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
df = odataR_get_table(table_id="82935NED")
df = odataR_get_table(table_id="82935NED",keepcode = "RegioS")
df = odataR_get_table(table_id="82935NED",keepcode = c("RegioS","Perioden"))
df = odataR_get_table(table_id="82935NED",
query = paste0("?$filter=startswith(RegioS,'NL01')",
"&$select=RegioS,Perioden,TotaleInvesteringen_1",
"&$skip=2&$top=3"),
debug=T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.