Learn R Programming

psychmeta (version 1.0.2)

generate_bib: Generate a list of references included in meta-analyses

Description

This function generates a list of studies contributing to a meta-analysis

Usage

generate_bib(ma_obj = NULL, additional_citekeys = NULL, bib = NULL,
  analyses = "all", match = c("all", "any"), style = "apa",
  output_format = c("word", "html", "pdf", "text", "Rmd", "biblatex",
  "citekeys"), file = NULL, header = list())

Arguments

ma_obj

A psychmeta meta-analysis object with citekeys supplied.

additional_citekeys

Additional citekeys to include in the reference list.

bib

A BibTeX file containing the citekeys for the meta-analyses.

analyses

Which analyses to extract references for? See filter_ma for details.

match

Match all or any of the filter criteria? See filter_ma for details.

style

References should be formatted in what style? Can be the style ID for any https://github.com/citation-style-language/stylesCSL style (formatted examples of styles are available from the https://zotero.org/stylesZotero Style Repository). Defaults to APA style. (Requires an internet connection to retrieve styles. If unavailable, references will be rendered in Chicago style.)

output_format

The format of the output reference list. Available options are Word (default), HTML, PDF (requires the tinytex package), Rmarkdown, plain text, and BibLaTeX. Returning only the item citekeys is also possible.

file

The filename or filepath for the output file. If NULL, file will be saved as reference_list. Set to "console" or "print" to output directly to the R console.

header

A list of YAML header parameters to pass to link{rmarkdown::render}.

Value

A formatted reference list.

Examples

Run this code
# NOT RUN {
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)

generate_bib(ma_obj, analyses="all", match=c("all", "any"),
bib=system.file("sample_bibliography.bib", package="psychmeta"), style="apa",
output_format="word", header=list())
# }

Run the code above in your browser using DataLab