dvn (version 0.3.5)

dvSearch: Search a Dataverse

Description

Search a Dataverse by keyword(s) in one or more metadata fields.

Usage

dvSearch(query, boolean = "AND", dv = getOption('dvn'), browser = FALSE, ...)

Arguments

query
Either a list of named search parameters or an unnamed, one-element list containing an appropriately formatted character string of search parameters. Search parameters can be retrieved via dvSearchFields. If specified as a single character string, the search is performed on all available fields using a boolean OR logic.
boolean
A character string specifying the boolean “AND” (the default) or “OR” by which multiple values in the query parameter should be combined. Ignored if query is a single character string or one-element list.
dv
An optional character string specifying the Dataverse to query. Default is the Harvard IQSS Dataverse.
browser
A logical specifying whether the query should be executed in a web browser. Default is FALSE.
...
Optionally, additional arguments passed to getURL via dvQuery.

Value

objectId), made up of character strings containing dataverse objectIds.

Details

Unlike searching on the dataverse website, the API requires searching within named metdata fields. The set of available metadata fields can be retrieved from dvSearchFields.

See Also

dvSearchFields

Examples

Run this code
## Not run: 
# search1 <- dvSearch(list("authorName:leeper"))
# search2 <- dvSearch(list(title="Denmark",title="Sweden"),boolean="OR")
# search3 <- dvSearch("puppies")
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace