Skip to contents

Mega function to process and save PubMed data

Usage

save_process_pubmed_batch(
  pubmed_query_string = "",
  journal = NULL,
  year_low = 2024,
  year_high = 2024,
  month_low = "01",
  month_high = 12,
  day_low = "01",
  day_high = 31,
  data_folder = "data",
  suffix = "",
  batch_size = 5000,
  api_key = NULL,
  verbose = TRUE
)

Arguments

pubmed_query_string

The PubMed query string.

journal

The list of desired journals.

year_low

The year the data should start.

year_high

The year the data should end.

month_low

The year the data should start.

month_high

The year the data should end.

day_low

The year the data should start.

day_high

The year the data should end.

data_folder

Where to save the data.

suffix

What suffix to add to the name file.

batch_size

The download batch size.

api_key

The api key for faster processing (optional).

verbose

Whether to include progress messages.

Examples

# \dontshow{
.old_wd <- setwd(tempdir())
# }
if (FALSE) {
pubmed_query_string <- paste(
  "passion [Title/Abstract]",
  "AND Dualistic Model of Passion [Text Word]"
)

save_process_pubmed_batch(
  pubmed_query_string,
  year_low = 2023,
  year_high = 2023
)
}
# \dontshow{
unlink("easyPubMed_data_01.txt")
setwd(.old_wd)
# }