validate_record_ids: Validates dataset record ids from user input

View source: R/metadata.R

validate_record_idsR Documentation

Validates dataset record ids from user input


This takes a vector of user supplied record identifiers and validates them against the index. Typically the identifiers are provided as integers, but the function will also handle Zenodo URLs and DOIs.



## S3 method for class 'safe_record_set'
print(x, ...)

## S3 method for class 'safe_record_set'
x & y

## S3 method for class 'safe_record_set'
x | y



A vector of values containing Zenodo concept or record ids.

x, y

Objects of class safe_record_set


Further arguments to print methods, unused.


The function returns a data frame with class safe_record_set, containing the columns concept, record, available and, finally, mra containing the most recent available record (if any). The function can be run on an existing safe_record_set to update this information.

Note that record will be NA when a value represents a concept id. Inputs that do not match a record or concept ids are returned in the attribute mismatches of the record set.

This function is largely used internally to validate user inputs and to provide a common output for the search functions but is exported to allow users to check record ids and display summary information using the print method.


An object of class safe_record_set (see Details)

Methods (by generic)

  • print: Print a brief summary of "safe_record_set" objects.

  • &: Combine two record sets, retaining only records that are present in both.

  • |: Combine two record sets, including the records that are present in either.


   validate_record_ids(c(3247631, 3266827, 3266821, -1000))

safedata documentation built on April 25, 2022, 5:05 p.m.