worcs (version 0.1.2)

cite_all: Comprehensive citation Knit function for 'RStudio'

Description

This is a wrapper for render. First, this function parses the citations in the document, converting citations marked with double at sign, e.g.: @@reference2020, into normal citations, e.g.: @reference2020. Then, it renders the file.

Usage

cite_all(...)

Arguments

...

All arguments are passed to render.

Value

Returns NULL invisibly. This function is called for its side effect of rendering an 'R Markdown' file.

Examples

Run this code
# NOT RUN {
# NOTE: Do not use this function interactively, as in the example below.
# Only specify it as custom knit function in an 'R Markdown' file, like so:
# knit: worcs::cite_all

file_name <- file.path(tempdir(), "citeall.Rmd")
loc <- rmarkdown::draft(file_name,
                        template = "github_document",
                        package = "rmarkdown",
                        create_dir = FALSE,
                        edit = FALSE)
write(c("", "Optional reference: @reference2020"),
      file = file_name, append = TRUE)
cite_all(file_name)
# }

Run the code above in your browser using DataLab