portal_search: fetch datasets on a portal

Description Arguments Details Examples

Description

This method is used to retrieve datasets from a portal.

Arguments

nrows

an integer, indicates the number of records to fetch (defaults to NULL, i.e. all matching records are fetched)

refine

a named list

exclude

a named list

sort

a character

q

a character, used to do full-text search

lang

a character, the language used in the q parameter

theme

a character, one of the themes of the portal

Details

refine and exclude, if set, must be named lists where the names are the facets to use and the values of the list, the values to pick or exclude.

sort takes a character in the sortables element of the portal object and sorts the results according to its value. Add a - in front in order to sort in descending order (e.g. sort = "-commune").

q is used to perform a full text-search in all elements of the dataset. To search for all datasets containing the word "Paris", use q = "Paris". See here for more information.

lang can be set to use language-specific functions on the elements passed to the q parameter but is not implemented yet.

theme can be set to filter only datasets with a specific theme.

Examples

1
2
portal$search(nrows = NULL, refine = NULL, exclude = NULL, sort = NULL,
q = NULL, lang = NULL, theme = NULL)

Tutuchan/fodr documentation built on May 9, 2019, 5:16 p.m.