ds_search {dkanr} | R Documentation |
ds_search
Description
Search csv resource file stored in the datastore.
Usage
ds_search(resource_id, fields = NULL, filters = NULL, limit = 100,
offset = 0, sort = NULL, q = NULL, url = get_url(),
credentials = list(cookie = dkanr::get_cookie(), token =
dkanr::get_token()))
Arguments
resource_id |
character: DKAN resource ID |
fields |
character vector: fields to be returned by the request |
filters |
named character vector: filters to be applied when retrieving records |
limit |
numeric: Number of records to retrieve |
offset |
numeric: Number of results to skip in the beginning |
sort |
named character vector: field to be sorted by |
q |
character: full text query filter |
url |
character: The DKAN site URL |
credentials |
Optional list parameter. Default values are Cookie and Token generated by dkan_setup() |
Value
data.frame or character
Examples
## Not run:
ds_search(resource_id = '10c578a6-63c4-40bd-a55d-0c27bf276283',
fields = c('Country','City','Region','Population'),
filters = list('Country'=c('co','my'), 'Region'=c('04','09','22')),
limit = 20,
offset = 0,
sort = c('Country'='asc'),
q = "puertica",
url = get_url(),
as = 'df')
## End(Not run)
[Package dkanr version 0.1.3 Index]