dvSearch: Search a Dataverse

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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

Usage

1
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.

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.

Value

A dataframe containing one variable (objectId), made up of character strings containing dataverse objectIds.

Author(s)

Thomas J. Leeper

See Also

dvSearchFields

Examples

1
2
3
4
5
6
## Not run: 
search1 <- dvSearch(list("authorName:leeper"))
search2 <- dvSearch(list(title="Denmark",title="Sweden"),boolean="OR")
search3 <- dvSearch("puppies")

## End(Not run)


Search within the dvn package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.