Learn R Programming

phm (version 2.1.2)

getPubMed: Create a data table from a text file in PubMed format

Description

This function takes as input a file produced via PubMed in PubMed format and outputs a data frame with the id equal to the PMID, text equal to the abstract, date, title, and author for each publication in the file.

Usage

getPubMed(file)

Value

A data table with a row for each publication holding the id equal to the PMID, text equal to the abstract, date, title, and author for that publication.

Arguments

file

path to the PubMed file

Examples

Run this code
#Go to Pubmed and enter search criteria, save the result to PubMed format.
#If the file is called pubmed_result.txt and located in the current
#directory:
#PM=getPubMed("pubmed_result.txt")
#Will load the data from the search into a data table called PM

Run the code above in your browser using DataLab