format_citation {report}R Documentation

Citation formatting

Description

Convenience functions to manipulate and format citations. Only works with APA formatted citations, for now.

Usage

format_citation(citation, authorsdate = FALSE, short = FALSE, intext = FALSE)

cite_citation(citation)

clean_citation(citation)

Arguments

citation

A character string of a citation.

authorsdate

Only show authors and date (remove title, journal, etc.).

short

If more than one authors, replace by ⁠et al.⁠

intext

Remove brackets around the date (so that it can be placed inside larger parentheses).

Value

A character string.

Examples

library(report)

citation <- "Makowski, D., Ben-Shachar, M. S., Patil, I., & Ludecke, D. (2020).
Methods and Algorithms for Correlation Analysis in R. Journal of Open Source
Software, 5(51), 2306."

format_citation(citation, authorsdate = TRUE)
format_citation(citation, authorsdate = TRUE, short = TRUE)
format_citation(citation, authorsdate = TRUE, short = TRUE, intext = TRUE)

cite_citation(citation)
clean_citation(citation())

[Package report version 0.5.9 Index]