Learn R Programming

medrxivr (version 0.0.3)

mx_search: Search preprint data

Description

Search preprint data

Usage

mx_search(
  data = NULL,
  query = NULL,
  fields = c("title", "abstract", "authors", "category", "doi"),
  from_date = NULL,
  to_date = NULL,
  NOT = "",
  deduplicate = TRUE
)

Arguments

data

The preprint dataset that is to be searched, created either using mx_api_content() or mx_snapshot()

query

Character string, vector or list

fields

Fields of the database to search - default is Title, Abstract, Authors, Category, and DOI.

from_date

Defines earliest date of interest. Written in the format "YYYY-MM-DD". Note, records published on the date specified will also be returned.

to_date

Defines latest date of interest. Written in the format "YYYY-MM-DD". Note, records published on the date specified will also be returned.

NOT

Vector of regular expressions to exclude from the search. Default is NULL.

deduplicate

Logical. Only return the most recent version of a record. Default is TRUE.

Examples

Run this code
# NOT RUN {
# Using the daily snapshot
mx_results <- mx_search(data = mx_snapshot(), query = "dementia")
# }

Run the code above in your browser using DataLab