einfo {reutils} | R Documentation |
einfo
queries the NCBI EInfo utility to retrieve the names of all
valid Entrez databases, or, if db
is provided, to retrieve statistics
for a single database, including lists of indexing fields and available link
names. Version 2.0 data is requested by default.
einfo(db = NULL, version = "2.0", retmode = "xml")
db |
A valid NCBI database name. If |
version |
Specifies version 2.0 EInfo XML. Set to |
retmode |
'xml' (default) or 'json'. |
See the official online documentation for NCBI's EUtilities for additional information.
An einfo
object.
## Not run:
## Fetch a list of all current Entrez database names
einfo()
## Fetch statistics for an Entrez database and parse
## the data into a data.frame
x <- einfo("gene")
if (x$no_errors()) {
content(x, "parsed")
}
## Fetch statistics for an Entrez database in JSON format
## and parse the data into a list
x <- einfo("pubmed", retmode = "json")
if (x$no_errors()) {
content(x, "parsed")
}
## End(Not run)