Learn R Programming

rentrez (version 1.0.1)

entrez_link: Get links to datasets related to records from an NCBI database

Description

Discover records related to a set of unique identifiers from an NCBI database. The object returned by this function depends on the value set for the cmd argument. Printing the returned object lists the names , and provides a brief description, of the elements included in the object.

Usage

entrez_link(dbfrom, web_history = NULL, id = NULL, db = NULL,
  cmd = "neighbor", by_id = FALSE, config = NULL, ...)

Arguments

dbfrom
character Name of database from which the Id(s) originate
web_history
a web_history object
id
vector with unique ID(s) for records in database db.
db
character Name of the database to search for links (or use "all" to search all databases available for db. entrez_db_links allows you to discover databases that might have linked information (see examples).
cmd
link function to use. Allowled values include
  • neighbor (default). Returns a set of IDs indblinked to the input IDs indbfrom.
  • neighbor_score. As `neighbor'', but additionally returns similarity scores.
  • ne
by_id
logial If FALSE (default) return a single elink objects containing links for all of the provided ids. Alternatively, if TRUE return a list of elink objects, one for each ID in id.
config
vector configuration options passed to httr::GET
...
character Additional terms to add to the request, see NCBI documentation linked to in references for a complete list

Value

  • An elink object containing the data defined by the cmd argument (if by_id=FALSE) or a list of such object (if by_id=TRUE).

    file XMLInternalDocument xml file resulting from search, parsed with xmlTreeParse

References

http://www.ncbi.nlm.nih.gov/books/NBK25499/#_chapter4_ELink_

See Also

config for available configs

entrez_db_links

Examples

Run this code
pubmed_search <- entrez_search(db = "pubmed", term ="10.1016/j.ympev.2010.07.013[doi]")
 linked_dbs <- entrez_db_links("pubmed")
 linked_dbs
 nucleotide_data <- entrez_link(dbfrom = "pubmed", id = pubmed_search$ids, db ="nuccore")
 #Sources for the full text of the paper
 res <- entrez_link(dbfrom="pubmed", db="", cmd="llinks", id=pubmed_search$ids)
 linkout_urls(res)

Run the code above in your browser using DataLab