mx_snapshot: Access a static snapshot of the medRxiv repository

View source: R/mx_snapshot.R

mx_snapshotR Documentation

Access a static snapshot of the medRxiv repository

Description

[Available for medRxiv only] This function allows users to import a maintained static snapshot of the medRxiv repository, instead of downloading a copy from the API, which can become unavailable during peak usage times. The function dynamically retrieves multiple snapshot parts from the specified repository and combines them into a single dataframe.

Usage

mx_snapshot(commit = "main")

Arguments

commit

Commit hash or branch name for the snapshot, taken from https://github.com/yaoxiangli/medrxivr-data. Allows for reproducible searching by specifying the exact snapshot used to perform the searches. Defaults to "main", which will return the most recent snapshot from the main branch.

Value

A formatted dataframe containing the combined data from the snapshot parts, with reconstructed 'link_page' and 'link_pdf' columns.

See Also

Other data-source: mx_api_content(), mx_api_doi()

Examples


mx_data <- mx_snapshot()
mx_data_specific <- mx_snapshot(commit = "specific_commit_hash")



mcguinlu/medrxivr documentation built on Feb. 11, 2025, 4:45 p.m.