cite_easystats: Cite the easystats ecosystem

View source: R/cite_easystats.R

cite_easystatsR Documentation

Cite the easystats ecosystem

Description

A convenient function for those who wish to cite the easystats packages.

Usage

cite_easystats(
  packages = "easystats",
  format = c("text", "markdown", "biblatex"),
  intext_prefix = TRUE,
  intext_suffix = "."
)

## S3 method for class 'cite_easystats'
summary(object, what = "all", ...)

## S3 method for class 'cite_easystats'
print(x, what = "all", ...)

Arguments

packages

A character vector of packages to cite. Can be "all" for all easystats pacakges or a vector with specific package names.

format

The format to generate citations. Can be "text" for plain text, "markdown" for markdown citations and CSL bibliography (recommended for writing in RMarkdown), or "biblatex" for BibLaTeX citations and bibliography.

intext_prefix

A character vector of length 1 containing text to include before in-text citations. If TRUE, defaults to "Analyses were conducted using the easystats collection of packages ". If FALSE or NA, no prefix is included.

intext_suffix

A character vector of length 1 containing text to include after in-text citations. Defaults to ".". If FALSE or NA, no suffix is included.

what

What elements of the citations to print, can be "all", "intext", or "refs".

...

Not used. Included for compatibility with the generic function.

x, object

A "cite_easystats" object to print.

Value

A list of class "cite_easystats" with elements:

  • intext: In-text citations in the requested format

  • refs: References or bibliography in the requested format

Examples


# Cite just the 'easystats' umbrella package:
cite_easystats()
summary(cite_easystats(), what = "all")

# Cite every easystats package:
cite_easystats(packages = "all")
summary(cite_easystats(packages = "all"), what = "all")

# Cite specific packages:
cite_easystats(packages = c("modelbased", "see"))
summary(cite_easystats(packages = c("modelbased", "see")), what = "all")

# To cite easystats packages in an RMarkdown document, use:

## In-text citations:
print(cite_easystats(format = "markdown"), what = "intext")

## Bibliography (print with the  `output = 'asis'` option on the code chunk)
print(cite_easystats(format = "markdown"), what = "refs")



report documentation built on Sept. 11, 2024, 8:47 p.m.