View source: R/utility_functions.R
citations | R Documentation |
snpR will automatically track the methods used for calculations on a
snpRdata object. Using citations
on that object will provide
details on the the methods used, and can optionally write a .bib bibtex
formatted library containing citations for these methods.
citations(x, outbib = FALSE, return_bib = FALSE)
x |
snpRdata object |
outbib |
character, default FALSE. An optional file path to which a .bib bibtex library containing all of the citations for the used methods will be written. |
return_bib |
logical, default FALSE. If TRUE, returns a list containing
the bib entries and their details. The bib entries are formatted according
to |
Printed outputs contain the statistic calculated, the in-line citation for the method used, a bibtex key which corresponds to the .bib library written if the outbib argument is used, and a quick note giving any details.
If return_bib is TRUE, a list containing four parts:
keys: A vector of bibtex keys for each method.
stats: A vector of the stats used.
details: A vector of details for each method.
bib: A bibentry
for each citation,
see readBib
.
William Hemstrom
# calculate pi
x <- calc_pi(stickSNPs)
# fetch citations
citations(x)
# fetch citations and write bibtex .bib to citations.bib
## not run
## Not run:
citations(x, outbib = "citations.bib")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.