Learn R Programming

orcidtr (version 0.1.0)

orcid_search: User-friendly ORCID search

Description

Search for ORCID profiles using named parameters instead of Solr query syntax. This function provides a more intuitive interface than orcid.

Usage

orcid_search(
  given_name = NULL,
  family_name = NULL,
  affiliation_org = NULL,
  email = NULL,
  keywords = NULL,
  digital_object_ids = NULL,
  other_name = NULL,
  credit_name = NULL,
  rows = 10,
  start = 0,
  token = NULL,
  ...
)

Value

A data.table of search results (same structure as orcid). The total number of matches is available as attr(result, "found").

Arguments

given_name

Character string. Given (first) name to search for.

family_name

Character string. Family (last) name to search for.

affiliation_org

Character string. Organization name.

email

Character string. Email address (supports wildcards like *@example.org).

keywords

Character vector. One or more keywords to search for.

digital_object_ids

Character string. DOI or DOI pattern.

other_name

Character string. Alternative name.

credit_name

Character string. Credit/published name.

rows

Integer. Number of results to return (default: 10).

start

Integer. Starting position for pagination (default: 0).

token

Character string or NULL. Optional API token.

...

Additional parameters passed to orcid.

Details

This function constructs a Solr query from the provided parameters and calls orcid internally. Multiple parameters are combined with AND logic. Uses the expanded-search endpoint to return name information.

See Also

orcid for more flexible query syntax

Examples

Run this code
if (FALSE) {
# Search by name
results <- orcid_search(
  family_name = "Fabbri",
  given_name = "Lorenzo"
)

# Search by affiliation
results <- orcid_search(affiliation_org = "Stanford University")

# Search by keywords
results <- orcid_search(keywords = c("machine learning", "genomics"))

# Combine multiple criteria
results <- orcid_search(
  family_name = "Smith",
  affiliation_org = "Harvard",
  rows = 20
)
}

Run the code above in your browser using DataLab