Title: | Gathering Metadata About Publications, Grants, Clinical Trials from 'PubMed' Database |
Version: | 0.0.3 |
Description: | A set of tools to extract bibliographic content from 'PubMed' database using 'NCBI' REST API https://www.ncbi.nlm.nih.gov/home/develop/api/. |
License: | GPL-3 |
URL: | https://github.com/massimoaria/pubmedR |
BugReports: | https://github.com/massimoaria/pubmedR/issues |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | rentrez, XML |
Suggests: | bibliometrix, knitr, rmarkdown |
RoxygenNote: | 7.1.0 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2020-07-09 10:40:28 UTC; massimoaria |
Author: | Massimo Aria |
Maintainer: | Massimo Aria <massimo.aria@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2020-07-09 11:00:02 UTC |
Convert xml PubMed bibliographic data into a dataframe
Description
It converts PubMed data, downloaded using Entrez API, into a dataframe
Usage
pmApi2df(P, format = "bibliometrix")
Arguments
P |
is a list following the xml PubMed structure, downloaded using the function |
format |
is a character. If |
Value
a dataframe containing bibliographic records.
To obtain a free access to NCBI API, please visit: https://www.ncbi.nlm.nih.gov/pmc/tools/developers/
To obtain more information about how to write a NCBI search query, please visit: https://pubmed.ncbi.nlm.nih.gov/help/#search-tags
See Also
Examples
# Example: Querying a collection of publications
query <- "bibliometric*[Title/Abstract] AND english[LA]
AND Journal Article[PT] AND 2000:2020[DP]"
D <- pmApiRequest(query = query, limit = 100, api_key = NULL)
M <- pmApi2df(D)
Gather bibliographic content from PubMed database using NCBI entrez APIs
Description
It gathers metadata about publications from the NCBI PubMed database.
The use of NCBI PubMed APIs is entirely free, and doesn't necessary require an API key.
The function pmApiRequest
queries NCBI PubMed using an entrez query formulated through the function pmQueryBuild
.
Usage
pmApiRequest(query, limit, api_key = NULL)
Arguments
query |
is a character. It contains a search query formulated using the Entrez query language. |
limit |
is numeric. It indicates the max number of records to download. |
api_key |
is a character. It contains a valid api key API keys for the NCBI E-utilities. |
Details
Official API documentation is https://www.ncbi.nlm.nih.gov/books/NBK25500/.
Value
a list D composed by 5 objects:
data | It is the xml-structured list containing the bibliographic metadata collection downloaded from the PubMed database. | |
query | It a character object containing the original query formulated by the user. | |
query_translation | It a character object containing the query, translated by the NCBI Automatic Terms Translation system and submitted to the PubMed database. | |
records_downloaded | It is an integer object indicating the total number of records downloaded and stored in "data". | |
total_counts | It is an integer object indicating the total number of records matching the query (stored in the "query_translation" object"). |
To obtain a free access to NCBI API, please visit: https://www.ncbi.nlm.nih.gov/pmc/tools/developers/
To obtain more information about how to write a NCBI search query, please visit: https://pubmed.ncbi.nlm.nih.gov/help/#search-tags
See Also
Examples
query <- query <- "bibliometric*[Title/Abstract] AND english[LA]
AND Journal Article[PT] AND 2000:2020[DP]"
D <- pmApiRequest(query = query, limit = 100, api_key = NULL)
Count the number of documents returned by a query
Description
It counts the number of documents that a query returns from the NCBI PubMed database.
Usage
pmQueryTotalCount(query, api_key = NULL)
Arguments
query |
is a character. It contains a search query formulated using the Entrez query language. |
api_key |
is a character. It contains a valid API keys for the NCBI E-utilities. Default is |
Value
a list. It contains three objects:
n | The total number of records returned by the query | |
query_translation | The query transaltion by the NCBI Automatic Terms Translation system | |
web_history | The web history object. The NCBI provides search history features, which isuseful for dealing with large lists of IDs or repeated searches. |
To obtain a free access to NCBI API, please visit: https://www.ncbi.nlm.nih.gov/pmc/tools/developers/
See Also
Examples
query <- "bibliometric*[Title/Abstract] AND english[LA]
AND Journal Article[PT] AND 2000:2020[DP]"
D <- pmQueryTotalCount(query = query, api_key = NULL)