Description Usage Arguments Value Remarks Examples
This function can be used to get information from an OData catalog.
1 | odataR_get_cat(root = NULL, type = "Tables", query = NULL, debug = F)
|
root |
Character string with root of structure. Default NULL i.e. determined by the last use of |
type |
Type of catalog information. This type can be one of:
|
query |
OData query to restrict data returned from the catalog |
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 12 13 14 15 16 17 18 19 20 21 | ## Not run:
# all types in catalog:
df = odataR_get_cat(type=NULL)
# all Tables in catalog:
df = odataR_get_cat()
# all tables that have a Title starting with 'Vacature':
df = odataR_get_cat(query="?$filter=startswith(Title,'Vacature')")
# all tables that have a Title containing 'vacature' regardless of case:
df = odataR_get_cat(query="?$filter=substringof('vacature',tolower(Title))")
# all active tables that have a Title containing 'vacature' regardless of case:
df = odataR_get_cat(query="?$filter=substringof('vacature',tolower(Title)) and Frequency ne 'Stopgezet' ")
# all Featured entries in catalog:
df = odataR_get_cat(type='Featured')
# all Featured tables (?) in catalog:
df = odataR_get_cat(type='Table_Featured')
# all Themes in catalog:
df = odataR_get_cat(type='Themes')
# all Tables_Themes (?) in catalog:
df = odataR_get_cat(type='Tables_Themes')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.