identifiers function

Get identifiers

Get identifiers

This function aims to pluck out just identifiers into a vector for easy use downstream (e.g., use DOIs to fetch article metadata). You can still manually fetch additional data from outputs of functions in this package.

identifiers(x, type = "doi", ...) ## S3 method for class 'works' identifiers(x, type = "doi", ...) ## S3 method for class 'list' identifiers(x, type = "doi", ...) ## S3 method for class 'orcid_id' identifiers(x, type = "doi", ...) ## S3 method for class 'orcid' identifiers(x, type = "doi", ...) ## S3 method for class 'orcid_doi' identifiers(x, type = "doi", ...)

Arguments

  • x: An object of class works, orcid, orcid_id, orcid_doi, or a list that contains any number of the previous objects.

  • type: (character) One of doi (default), pmid, pmc, eid, other_id, orcid, scopus, researcherid. The orcid's here are for works, not individuals. This parameter is ignored for classes orcid and orcid_doi

    both of which would go down a rabbit hole of getting works for all ORCIDs which could take a while.

  • ...: Ignored.

Returns

(character) vector of identifiers, or NULL if none found

Examples

## Not run: # Result of call to works() x <- works(orcid_id("0000-0001-8607-8025")) # doi by default identifiers(x) # orcids identifiers(x, "orcid") # pmid identifiers(x, "pmid") # pmc identifiers(x, "pmc") # other_id identifiers(x, "other_id") # Result of call to orcid_id() x <- orcid_id(orcid = "0000-0002-9341-7985") identifiers(x, "doi") identifiers(x, "eid") # Result of call to orcid() x <- orcid(query="carl+boettiger") identifiers(x) # Result of call to orcid_doi() x <- orcid_doi(dois="10.1087/20120404", fuzzy=TRUE) identifiers(x) ## End(Not run)

References

list of identifiers https://pub.qa.orcid.org/v2.0/identifiers?locale=en

  • Maintainer: Scott Chamberlain
  • License: MIT + file LICENSE
  • Last published: 2021-01-20