count_records: Retrieve the number of records returned by a query.

View source: R/count_records.R

count_recordsR Documentation

Retrieve the number of records returned by a query.

Description

count_records returns a count of PubMed records returned by a search.

Usage

count_records(
  search_terms,
  pub_type = "journal article",
  api_key = NULL,
  date_type = "PDAT",
  min_date = "1966/01/01",
  max_date = format(Sys.Date(), "%Y/%m/%d")
)

Arguments

search_terms

A character string of terms that define the scope of the PubMed database query. Boolean operators (AND, OR, NOT) and search field tags may be used to create more complex search criteria. Commonly used search fields tags include:

[TI]

Word in title

[TIAB]

Word in title or abstract

[MH]

Medical Subject Heading (MeSH)

[AU]

Author name (e.g., Doe J)

[AD]

Author institutional affiliation

[TA]

Journal title (e.g., J Pain)

For a full set of search fields tags: PubMed search field tags. Note that the article publication type, date type, and date range are modified using the pub_type, date_type, min_date and max_date arguments below.

pub_type

A character string specifying the type of publication the search must return. The default value is journal article. For more information: PubMed article types.

api_key

An API character string obtained from the users NCBI account. The key is not essential, but it specifying a key gives substantially faster record query rates.

date_type

A character string specifying the publication date type that is being specified in the search. Available values are:

PDAT

Date the article was published (default).

MDAT

Date the PubMed entry was modified.

EDAT

Date the entry was added to PubMed.

min_date

A character string in the format 'YYYY/MM/DD', 'YYYY/MM' or 'YYYY' specifying the starting date of the search. The default value is 1966/01/01'.

max_date

A character string in the format 'YYYY/MM/DD', 'YYYY/MM' or 'YYYY' specifying the end date of the search. The default value is Sys.Date().

See Also

entrez_search

Other related functions: get_records()


kamermanpr/pubmedRecords documentation built on Feb. 5, 2023, 1:22 a.m.