citation                package:utils                R Documentation

_C_i_t_i_n_g _R _a_n_d _R _P_a_c_k_a_g_e_s _i_n _P_u_b_l_i_c_a_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     How to cite R and R packages in publications.

_U_s_a_g_e:

     citation(package = "base", lib.loc = NULL)
     ## S3 method for class 'citation':
     toBibtex(object, ...)
     ## S3 method for class 'citationList':
     toBibtex(object, ...)

_A_r_g_u_m_e_n_t_s:

 package: a character string with the name of a single package. An
          error occurs if more than one package name is given.

 lib.loc: a character vector with path names of R libraries, or 'NULL'.
           The default value of 'NULL' corresponds to all libraries
          currently known.  If the default is used, the loaded packages
          are searched before the libraries.

  object: return object of 'citation'.

     ...: currently not used.

_D_e_t_a_i_l_s:

     The R core development team and the very active community of
     package authors have invested a lot of time and effort in creating
     R as it is today. Please give credit where credit is due and cite
     R and R packages when you use them for data analysis.

     Execute function 'citation()' for information on how to cite the
     base R system in publications. If the name of a non-base package
     is given, the function either returns the information contained in
     the 'CITATION' file of the package or auto-generates citation
     information. In the latter case the package 'DESCRIPTION' file is
     parsed, the resulting citation object may be arbitrarily bad, but
     is quite useful (at least as a starting point) in most cases.

     If only one reference is given, the print method shows both a text
     version and a BibTeX entry for it, if a package has more than one
     reference then only the text versions are shown. The BibTeX
     versions can be obtained using function 'toBibtex' (see the
     examples below).

_V_a_l_u_e:

     An object of class '"citationList"'.

_S_e_e _A_l_s_o:

     'citEntry'

_E_x_a_m_p_l_e_s:

     ## the basic R reference
     citation()

     ## references for a package -- might not have these installed
     if(nchar(system.file(package="lattice"))) citation("lattice")
     if(nchar(system.file(package="foreign"))) citation("foreign")

     ## extract the bibtex entry from the return value
     x <- citation()
     toBibtex(x)

