pubmed               package:annotate               R Documentation

_A _f_u_n_c_t_i_o_n _t_o _o_p_e_n _t_h_e _b_r_o_w_s_e_r _t_o _P_u_b_m_e_d _w_i_t_h _t_h_e _s_e_l_e_c_t_e_d _g_e_n_e.

_D_e_s_c_r_i_p_t_i_o_n:

     Given a vector of Pubmed identifiers or accession numbers, the
     user can either have a browser display a URL showing a Pubmed
     query for those identifiers, or a XMLdoc object with the same
     data.

_U_s_a_g_e:

     pubmed(...,disp=c("data","browser"), type=c("uid","accession"),
            pmaddress=.pmfetch("PubMed", disp, type))

_A_r_g_u_m_e_n_t_s:

     ...: Vectorized set of Pubmed ID's

    disp: Either "Data" or "Browser" (default is data).  Data returns a
          XMLDoc, while Browser will display information in the user's
          browser.

    type: Denotes whether the arguments are accession numbers or UIDS. 
          Defaults to uids.

pmaddress: Specific path to the pubmed pmfetch engine from the NCBI
          website.

_D_e_t_a_i_l_s:

     A simple function to retrieve Pubmed data given a specific ID,
     either through XML or through a web browser.  This function will
     accept either pubmed accession numbers or NCBI UIDs (defined as a
     Pubmed ID or a Medline ID) - although the types must not be mixed
     in a single call. 

     WARNING:  The powers that be at NCBI have been known to ban the IP
     addresses of users who abuse their servers (currently defined as
     less then 2 seconds between queries).  Do NOT put this function in
     a type loop or you may find your access revoked.

_V_a_l_u_e:

     If the option "data" is used, an object of type XMLDoc is
     returned, unless there was an error with the query in which case
     an object of type try-error is returned.

     If the option "browser" is used, nothing is returned.

_A_u_t_h_o_r(_s):

     R. Gentleman

_S_e_e _A_l_s_o:

     'genbank', 'xmlTreeParse'

_E_x_a_m_p_l_e_s:

        if( interactive() )
         opts <- c("data","browser") else
         opts <- "data"
        for (dp in opts)
          pubmed("11780146","11886385","11884611",disp=dp)

