Learn R Programming

rentrez (version 0.3.1)

entrez_search: Search the NCBI databases using EUtils

Description

Contstructs a query with the given arguments, including a search term, and a darabase name, then retrieves the XML document created by that query. See package-level documentation for general advice on using the Entrez functions

Usage

entrez_search(db, term, config = NULL, ...)

Arguments

db
character Name of the database to search for
term
character The search term
...
character Additional terms to add to the request
config
vector configuration options passed to httr::GET

Value

  • ids integer Unique IDS returned by the search

    count integer Total number of hits for the search

    retmax integer Maximum number of hits returned by the search

    QueryKey integer identifier for specific query in webhistory

    WebEnv character identifier for session key to use with history

    file XMLInternalDocument xml file resulting from search, parsed with xmlTreeParse

See Also

config for avaliable configs

Examples

Run this code
query <- "Gastropoda[Organism] AND COI[Gene]"
   web_env_search <- entrez_search(db="nuccore", query, usehistory="y")
   cookie <- web_env_search$WebEnv
   qk <- web_env_search$QueryKey
   snail_coi <- entrez_fetch(db = "nuccore", WebEnv = cookie, query_key = qk,
                             file_format = "fasta", retmax = 10)

Run the code above in your browser using DataLab