einfo: einfo - getting database statistics and search fields

Description Usage Arguments Details Value See Also Examples

View source: R/einfo.R

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

1
einfo(db = NULL, version = "2.0", retmode = "xml")

Arguments

db

A valid NCBI database name. If NULL, a list of all current NCBI databases is returned.

version

Specifies version 2.0 EInfo XML. Set to NULL for the older version.

retmode

'xml' (default) or 'json'.

Details

See the official online documentation for NCBI's EUtilities for additional information.

Value

An einfo object.

See Also

content, getUrl, getError.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## 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)

gschofl/reutils documentation built on Dec. 9, 2018, 1:27 a.m.