Description Usage Arguments Value Examples
get_JSON_doc
will return infomation about the requested resource. Ideally, will be just used internally.
1 2 | get_JSON_doc(link = "https://data.gov.in/api/datastore/resource.json?",
res_id, offset, no_elements, filter, select, sort, verbose = FALSE)
|
link |
a string, general JSON data link |
res_id |
a string, JSON data resource id |
offset |
an integer, offset of 1 corresponds to 100 elements |
no_elements |
an integer, no of elements to download a value between 1 to 100 |
filter |
a named vector, specifying equality constrainsts of the form "variable" = "condition" |
select |
a vector, specifying variables/fields to be selected |
sort |
a named vector, specifying sort order in the form "variable" = "asc" |
verbose |
a boolean, specifying whether to print verbose messages |
JSON data object i.e. a list
1 2 3 4 5 6 7 8 9 10 | ## Not run:
library(RCurl)
library(RJSONIO)
# Return 100 elements from a hotels data resource
JSON_doc = get_JSON_doc(link="http://data.gov.in/api/datastore/resource.json?",
res_id="0749068c-a590-4a07-a571-e9df5dddcc8a",
offset=0,
no_elements=100)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.