einfo {reutils} | R Documentation |
einfo - getting database statistics and search fields
Description
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.
Usage
einfo(db = NULL, version = "2.0", retmode = "xml")
Arguments
db |
A valid NCBI database name. If |
version |
Specifies version 2.0 EInfo XML. Set to |
retmode |
'xml' (default) or 'json'. |
Details
See the official online documentation for NCBI's EUtilities for additional information.
Value
An einfo
object.
See Also
Examples
## 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)
[Package reutils version 0.2.3 Index]