This function generates a list of studies contributing to a meta-analysis
generate_bib(ma_obj = NULL, bib = NULL, title.bib = NULL,
style = "apa", additional_citekeys = NULL, file = NULL,
output_dir = getwd(), output_format = c("word", "html", "pdf",
"text", "odt", "rmd", "biblatex", "citekeys"), analyses = "all",
match = c("all", "any"), case_sensitive = TRUE,
save_build_files = FALSE, header = list(), ...)
A psychmeta meta-analysis object with citekeys
supplied.
A BibTeX file containing the citekeys for the meta-analyses.
The title to give to the bibliography. If NULL
, defaults to "Sources Contributing to Meta-Analyses"
What style should references be formatted in? Can be a file path or URL for a CSL citation style or the style ID for any style available from the Zotero Style Repository). Defaults to APA style. (Retrieving a style by ID requires an internet connection. If unavailable, references will be rendered in Chicago style.).
Additional citekeys to include in the reference list.
The filename or filepath for the output file. If NULL
, function will output directly to the R console (if output_format
is "text", the formatted references in BibOptions
"authoryear" style; if "citekeys", the citekeys for included sources; otherwise, code to generate the bibliography in an RMarkdown document).
The filepath for the output file. Defaults to the current working directory.
The format of the output reference list. Available options are Word (default), HTML, PDF (requires LaTeX to be installed), ODT, or Rmarkdown, plain text, and BibLaTeX. Returning only the item citekeys is also possible. You can also specify the full name of another RMarkdown output_format
.
Which analyses to extract references for? See filter_ma
for details.
Match all
or any
of the filter criteria? See filter_ma
for details.
Logical scalar that determines whether character values supplied in analyses
should be treated as case sensitive (TRUE
, default) or not (FALSE
).
Should the BibTeX and RMarkdown files used to generate the bibliography be saved (default: FALSE
; always TRUE
if file is NULL
)?
A list of YAML header parameters to pass to link{rmarkdown::render}
.
Additional arguments to pass to render
.
A list containing the RefManageR BibEntry object. Additionally, a reference list formatted in the requested style and output_format is exported (or printed if file is "console").
Other output functions: metabulate_rmd_helper
,
metabulate
# NOT RUN {
## Run a meta-analysis using ma_r() and include a citekey argument to provide
## citation information for each source contributing to the meta-analyses.
ma_obj <- ma_r(ma_method = "ic", rxyi = rxyi, n = n, rxx = rxxi, ryy = ryyi,
construct_x = x_name, construct_y = y_name, sample_id = sample_id,
moderators = moderator, citekey = citekey, data = data_r_meas_multi)
## Next, use generate_bib() to generate the bibliography for the retained studies.
## The bib argument is the BibTeX or BibLaTeX .bib file containing the full
## reference information for each of the citekeys included in the meta-analysis database.
generate_bib(ma_obj, bib = system.file("templates/sample_bibliography.bib", package="psychmeta"),
file = "sample bibliography", output_dir = tempdir(), output_format = "word")
# }
Run the code above in your browser using DataLab